theraven
b7986e9efa
Ooops. Accidentally left the bit that actually did the optimisation commented out.
15 years ago
theraven
8f423d0e29
Fix non-fragile ivar short-circuiting (i.e. hard-code the CORRECT ivar addresses, don't make foo and foobar have the same offset).
15 years ago
theraven
5705845e98
Fixed some bugs with the optimisation passes and introduced support for automatically running them (requires LLVM 3 + a patch that is not yet in trunk, but should be soon).
15 years ago
theraven
34aa9f9455
Allowed LLVM optimisations to build against both LLVM 2.9 and LLVM 3.0.
15 years ago
theraven
15ddbdfd71
Added meta-pass that runs all of the LLVM optimisations.
15 years ago
theraven
9d5452b147
Fixed LLVM passes to compile with recent LLVM.
...
Made class caching pass cache classes in a static variable if the original class is not available.
15 years ago
theraven
0c8d2bd7b8
Added missing files.
16 years ago
theraven
a6b5cd15dc
Rename the library with the lib prefix so it can actually be linked sensibly.
16 years ago
theraven
23447feca5
Profile-driven inlining of Objective-C methods.
16 years ago
theraven
9ea9a6cf41
Made inlining conditional on inlining actually being sensible.
16 years ago
theraven
6a58d3d49d
Added unfinished inliner that uses type feedback info to inline instance methods.
...
Made class method inliner also inline message sends to super.
Various updates caused by clang now attaching more sensible metadata to the IR.
16 years ago
theraven
c425b1bfdc
Initial (working) type feedback pass. Records the IMP for every message lookup. Note: This writes 3 words for every single message send, which means that it makes code VERY slow and can fill up the filesystem if you leave it enabled.
...
The aim of this pass is to identify message send sites which can benefit from speculative inlining and inline caching. By itself, this pass is useless. It will later be combined with one that parses this information and then uses the existing caching and inlining infrastructure to optimize hot message send sites.
Now, however, it's time for me to go and dance, so the useful bit will have to wait.
16 years ago
theraven
6cac2816cc
Added speculative inlining of class messages. Currently inlines all that it can, without deciding whether it's sensible.
16 years ago
theraven
beb8356367
Made ClassIMPCache a ModulePass (it shouldn't be a FunctionPass because it adds globals).
16 years ago
theraven
60f87bc4ad
Removed debugging code that shouldn't have been in last commit.
...
Aside: Testing the two passes from the last commit shows that they provide about a factor of 10 speedup for class messages.
16 years ago
theraven
84b41a8464
Added -gnu-class-lookup-cache and -gnu-class-imp-cache passes. These add caching for class messages and also skip the class lookup (using the class symbol directly) where possible.
...
In combination, these make class messages marginally slower than function calls, rather than significantly slower than message sends.
16 years ago
theraven
352dfe2d93
Removed some unneeded #includes.
16 years ago
theraven
874ec4bd66
Fixed IMP cacher to not cache the slot if the lookup function changes the receiver (this could result in a method being called on the wrong receiver, which would just be confusing).
16 years ago
theraven
dfc4a0286b
Factored out code that performs IMP caching into a separate class. This can now be used by other passes that cache IMPs outside of loops (for example, always caching class messages because they always have the same receiver).
16 years ago
theraven
1918888ce1
Added LoopIMPCachePass. This pass automatically performs IMP caching on all loops.
...
Microbenchmark that just sends a message that does nothing 1000000000 times in a loop goes from taking 10.2 seconds to taking 4.7 after running the pass.
16 years ago
theraven
93251416eb
Added LLVM optimisation passes for libobjc2.
16 years ago