[llvm-commits] CVS: llvm/tools/lli/JIT/VM.cpp
Brian Gaeke
gaeke at niobe.cs.uiuc.edu
Wed Aug 13 13:17:01 PDT 2003
Changes in directory llvm/tools/lli/JIT:
VM.cpp updated: 1.6 -> 1.7
---
Log message:
Deconstify parameter to getPointerToFunction().
Run passes on single function (hey, just-in-time compilation!)
instead of the entire module that contains it.
---
Diffs of the changes:
Index: llvm/tools/lli/JIT/VM.cpp
diff -u llvm/tools/lli/JIT/VM.cpp:1.6 llvm/tools/lli/JIT/VM.cpp:1.7
--- llvm/tools/lli/JIT/VM.cpp:1.6 Sun Jun 1 18:24:36 2003
+++ llvm/tools/lli/JIT/VM.cpp Wed Aug 13 13:16:34 2003
@@ -39,7 +39,7 @@
/// getPointerToFunction - This method is used to get the address of the
/// specified function, compiling it if neccesary.
///
-void *VM::getPointerToFunction(const Function *F) {
+void *VM::getPointerToFunction(Function *F) {
void *&Addr = GlobalAddress[F]; // Function already code gen'd
if (Addr) return Addr;
@@ -49,11 +49,9 @@
static bool isAlreadyCodeGenerating = false;
assert(!isAlreadyCodeGenerating && "ERROR: RECURSIVE COMPILATION DETECTED!");
- // FIXME: JIT all of the functions in the module. Eventually this will JIT
- // functions on demand. This has the effect of populating all of the
- // non-external functions into the GlobalAddress table.
+ // JIT the function
isAlreadyCodeGenerating = true;
- PM.run(getModule());
+ PM.run(*F);
isAlreadyCodeGenerating = false;
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
More information about the llvm-commits
mailing list