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
This commit is contained in:
Argyrios Kyrtzidis
2009-05-18 21:06:40 +00:00
parent 8ad05c4bdf
commit b3a847db0b
4 changed files with 42 additions and 6 deletions

View File

@@ -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.