[LLVMbugs] [Bug 177] [JIT] Functions pointed to by global variables should be lazily compiled!
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Thu Dec 11 23:18:21 PST 2003
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=177
sabre at nondot.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From sabre at nondot.org 2003-12-12 01:18 -------
These patches implement this (for X86. Sparc needs a small patch to implement
the new hook):
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031208/010113.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031208/010114.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031208/010115.html
Fixing this speeds up "ll-tblgen --help" from 4.55s to 2.36s, and "ll-opt
--help" goes from 18.85s to 7.30s. We now "only" compile 111413 bytes of
machine code, instead of 284680 bytes for ll-tblgen. Fixing Bug 135 would also
provide another HUGE speedup, because we are initializing 4.23Mbytes of global
variables (vtables, rtti info, ...), though they are presumably all completely
unreferenced in such a short run.
For the testcase in the PR, I now get this, which is what we want:
$ lli -debug-only=jit test.o
Global 'P1' -> 0x84e44a8
Global 'P2' -> 0x84e44b8
Finished CodeGen of [0x4018dffa] Function stub for: bar: 6 bytes of text
Finished CodeGen of [0x4018dff4] Function stub for: baz: 6 bytes of text
Finished CodeGen of [0x4018e000] Function: main: 57 bytes of text
WARNING: Cannot resolve fn '__main' using a dummy noop function instead!
[zion ~]$ lli -debug-only=jit test.o x
Global 'P1' -> 0x84e44a8
Global 'P2' -> 0x84e44b8
Finished CodeGen of [0x4018dffa] Function stub for: bar: 6 bytes of text
Finished CodeGen of [0x4018dff4] Function stub for: baz: 6 bytes of text
Finished CodeGen of [0x4018e000] Function: main: 57 bytes of text
WARNING: Cannot resolve fn '__main' using a dummy noop function instead!
Finished CodeGen of [0x4018e03c] Function: qux: 16 bytes of text
Finished CodeGen of [0x4018e04c] Function: baz: 7 bytes of text
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list