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 | b3a847db0b991d3210706a2580428fdc2b6bf037 (patch) | |
tree | 2f34ed840e41f013e92145cae1a398eb4db45bc6 /lib/ExecutionEngine/JIT/JIT.h | |
parent | 8ad05c4bdf2739742131adbab247e5c8ee0df857 (diff) | |
download | llvm-b3a847db0b991d3210706a2580428fdc2b6bf037.tar.gz llvm-b3a847db0b991d3210706a2580428fdc2b6bf037.tar.bz2 llvm-b3a847db0b991d3210706a2580428fdc2b6bf037.tar.xz |
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.h')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h index d5646063e9..02955ab3ad 100644 --- a/lib/ExecutionEngine/JIT/JIT.h +++ b/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. |