diff options
| author | Brian Gaeke <gaeke@uiuc.edu> | 2003-08-13 18:16:34 +0000 |
|---|---|---|
| committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-08-13 18:16:34 +0000 |
| commit | 5896956ff09a78c254492afabeff77f1088b88e6 (patch) | |
| tree | 4d6d2dcbbb7cf587b725991b878bdf4c3a9f2df7 /llvm/lib/ExecutionEngine/JIT/VM.cpp | |
| parent | 1678e859b08de45afdd5efab8aa909673f0d9c31 (diff) | |
| download | bcm5719-llvm-5896956ff09a78c254492afabeff77f1088b88e6.tar.gz bcm5719-llvm-5896956ff09a78c254492afabeff77f1088b88e6.zip | |
Deconstify parameter to getPointerToFunction().
Run passes on single function (hey, just-in-time compilation!)
instead of the entire module that contains it.
llvm-svn: 7819
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/VM.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/VM.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/VM.cpp b/llvm/lib/ExecutionEngine/JIT/VM.cpp index d5815e8dd88..ee7e311ebbd 100644 --- a/llvm/lib/ExecutionEngine/JIT/VM.cpp +++ b/llvm/lib/ExecutionEngine/JIT/VM.cpp @@ -39,7 +39,7 @@ void VM::setupPassManager() { /// 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 @@ void *VM::getPointerToFunction(const Function *F) { 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!"); |

