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.h | |
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.h')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.h b/llvm/lib/ExecutionEngine/JIT/JIT.h index d5646063e98..02955ab3ad8 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.h +++ b/llvm/lib/ExecutionEngine/JIT/JIT.h @@ -23,6 +23,7 @@ class Function; class TargetMachine; class TargetJITInfo; class MachineCodeEmitter; +class MachineCodeInfo; class JITState { private: @@ -151,14 +152,18 @@ public: static ExecutionEngine *createJIT(ModuleProvider *MP, std::string *Err, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel); - + + + // Run the JIT on F and return information about the generated code + void runJITOnFunction(Function *F, MachineCodeInfo *MCI = 0); + private: static MachineCodeEmitter *createEmitter(JIT &J, JITMemoryManager *JMM); - void runJITOnFunction(Function *F); + void registerMachineCodeInfo(MachineCodeInfo *MCI); void runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked); void updateFunctionStub(Function *F); void updateDlsymStubTable(); - + protected: /// getMemoryforGV - Allocate memory for a global variable. |