theraven
0c8d2bd7b8
Added missing files.
2010-05-19 14:16:26 +00:00
theraven
a6b5cd15dc
Rename the library with the lib prefix so it can actually be linked sensibly.
2010-05-09 12:28:36 +00:00
theraven
23447feca5
Profile-driven inlining of Objective-C methods.
2010-05-01 18:24:22 +00:00
theraven
9ea9a6cf41
Made inlining conditional on inlining actually being sensible.
2010-05-01 15:54:27 +00:00
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.
2010-05-01 13:56:59 +00:00
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.
2010-04-29 17:56:36 +00:00
theraven
6cac2816cc
Added speculative inlining of class messages. Currently inlines all that it can, without deciding whether it's sensible.
2010-04-28 21:27:54 +00:00
theraven
beb8356367
Made ClassIMPCache a ModulePass (it shouldn't be a FunctionPass because it adds globals).
2010-04-28 15:21:23 +00:00
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.
2010-04-28 14:47:02 +00:00
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.
2010-04-28 14:33:52 +00:00
theraven
352dfe2d93
Removed some unneeded #includes.
2010-04-28 12:24:03 +00:00
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).
2010-04-28 12:20:26 +00:00
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).
2010-04-28 11:38:31 +00:00
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.
2010-04-27 22:34:15 +00:00
theraven
93251416eb
Added LLVM optimisation passes for libobjc2.
2010-03-13 18:43:56 +00:00