24 struct JITEvent_EmittedFunctionDetails;
25 class MachineCodeEmitter;
26 class MachineCodeInfo;
37 std::vector<AssertingVH<Function> > PendingFunctions;
48 return PendingFunctions;
62 std::vector<JITEventListener*> EventListeners;
67 bool AllocateGVsWithCode;
71 bool isAlreadyCodeGenerating;
102 bool GVsWithCode =
true,
118 const std::vector<GenericValue> &ArgValues);
129 bool AbortOnFailure =
true);
186 std::string *ErrorStr,
204 BasicBlockAddressMapTy &
206 return BasicBlockAddressMap;
void NotifyFunctionEmitted(const Function &F, void *Code, size_t Size, const JITEvent_EmittedFunctionDetails &Details)
virtual void UnregisterJITEventListener(JITEventListener *L)
void * getPointerToFunction(Function *F)
BasicBlockAddressMapTy & getBasicBlockAddressMap(const MutexGuard &)
The main container class for the LLVM Intermediate Representation.
void addPointerToBasicBlock(const BasicBlock *BB, void *Addr)
addPointerToBasicBlock - Adds address of the specific basic block.
static ExecutionEngine * createJIT(Module *M, std::string *ErrorStr, JITMemoryManager *JMM, bool GVsWithCode, TargetMachine *TM)
FunctionPassManager & getPM(const MutexGuard &L)
static void CompilationCallback()
void * getPointerToFunctionOrStub(Function *F)
static ExecutionEngine * create(Module *M, std::string *Err, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel=CodeGenOpt::Default, bool GVsWithCode=true, Reloc::Model RM=Reloc::Default, CodeModel::Model CMM=CodeModel::JITDefault)
void runJITOnFunction(Function *F, MachineCodeInfo *MCI=0)
Guard a section of code with a Mutex.
LLVM Basic Block Representation.
std::vector< AssertingVH< Function > > & getPendingFunctions(const MutexGuard &L)
static ExecutionEngine * createJIT(Module *M, std::string *ErrorStr=0, JITMemoryManager *JMM=0, CodeGenOpt::Level OptLevel=CodeGenOpt::Default, bool GVsWithCode=true, Reloc::Model RM=Reloc::Default, CodeModel::Model CMM=CodeModel::JITDefault)
void * getOrEmitGlobalVariable(const GlobalVariable *GV)
void freeMachineCodeForFunction(Function *F)
void addPendingFunction(Function *F)
void clearPointerToBasicBlock(const BasicBlock *BB)
clearPointerToBasicBlock - Removes address of specific basic block.
Abstract interface for implementation execution of LLVM modules, designed to support both interpreter...
void * getPointerToBasicBlock(BasicBlock *BB)
void * recompileAndRelinkFunction(Function *F)
Module * getModule() const
void NotifyFreeingMachineCode(void *OldPtr)
virtual void addModule(Module *M)
JITCodeEmitter * getCodeEmitter() const
virtual void * getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure=true)
virtual char * getMemoryForGV(const GlobalVariable *GV)
getMemoryforGV - Allocate memory for a global variable.
TargetJITInfo & getJITInfo() const
virtual bool removeModule(Module *M)
static ExecutionEngine *(* JITCtor)(Module *M, std::string *ErrorStr, JITMemoryManager *JMM, bool GVsWithCode, TargetMachine *TM)
virtual void RegisterJITEventListener(JITEventListener *L)
virtual GenericValue runFunction(Function *F, const std::vector< GenericValue > &ArgValues)