mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
eb6bad32e9
Instead of emitting a JIT stub that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { header: %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=1] call void %resolverCast( int %0 ) ret void } Emit one that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { Entry: %fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache ; <void (int)*> [#uses=2] %isNull = seteq void (int)* %fpcache, null ; <bool> [#uses=1] br bool %isNull, label %lookupfp, label %usecache usecache: ; preds = %lookupfp, %Entry %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ] ; <void (int)*> [#uses=1] call void %fp( int %0 ) ret void lookupfp: ; preds = %Entry %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=2] store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache br label %usecache } This makes the JIT debugger *MUCH* faster on large programs, as getPointerToNamedFunction takes time linear with the size of the program, and before we would call it every time a function in the text module was called from the safe module (ouch!). llvm-svn: 22387 |
||
---|---|---|
.. | ||
analyze | ||
bugpoint | ||
gccas | ||
gccld | ||
llc | ||
lli | ||
llvm-ar | ||
llvm-as | ||
llvm-bcanalyzer | ||
llvm-db | ||
llvm-dis | ||
llvm-extract | ||
llvm-ld | ||
llvm-link | ||
llvm-nm | ||
llvm-prof | ||
llvm-ranlib | ||
llvm-stub | ||
llvmc | ||
opt | ||
Makefile |