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
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index d564606..02955ab 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -23,6 +23,7 @@
class TargetMachine;
class TargetJITInfo;
class MachineCodeEmitter;
+class MachineCodeInfo;
class JITState {
private:
@@ -151,14 +152,18 @@
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.