diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-18 21:06:40 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-18 21:06:40 +0000 |
| commit | c65c525617e3f2cd4d1c0902562a9ee064e90b09 (patch) | |
| tree | 855d20cf227bdffa3e069bda688c4f57057bd138 /llvm/lib/ExecutionEngine/JIT/JIT.cpp | |
| parent | c1585be6bd6f40605294b359642b72ce67f9c2f6 (diff) | |
| download | bcm5719-llvm-c65c525617e3f2cd4d1c0902562a9ee064e90b09.tar.gz bcm5719-llvm-c65c525617e3f2cd4d1c0902562a9ee064e90b09.zip | |
Allow the JIT ExecutionEngine to report details about the generated machine code.
Introduce a new class (MachineCodeInfo) that the JIT can fill in with details. Right now, just the address and the size of the machine code are reported.
Patch by Evan Phoenix!
llvm-svn: 72040
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JIT.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 21e670aadc9..522a08dd783 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -21,6 +21,7 @@ #include "llvm/ModuleProvider.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/ExecutionEngine/GenericValue.h" +#include "llvm/CodeGen/MachineCodeInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetJITInfo.h" @@ -512,9 +513,14 @@ GenericValue JIT::runFunction(Function *F, /// just-in-time compilation passes on F, hopefully filling in /// GlobalAddress[F] with the address of F's machine code. /// -void JIT::runJITOnFunction(Function *F) { +void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) { MutexGuard locked(lock); + + registerMachineCodeInfo(MCI); + runJITOnFunctionUnlocked(F, locked); + + registerMachineCodeInfo(0); } void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) { |

