9 Commits (6cac2816cca4d534aa7f771d45ad28e18c56bc5d)

Author SHA1 Message Date
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