Home | History | Annotate | Download | only in JIT

Lines Matching refs:jit

1 //===-- JIT.cpp - LLVM Just in Time Compiler ------------------------------===//
15 #include "JIT.h"
63 RegisterJIT() { JIT::Register(); }
71 /// createJIT - This is the factory method for creating a JIT for the current
74 ExecutionEngine *JIT::createJIT(Module *M,
84 // If the target supports JIT code generation, create the JIT.
86 return new JIT(M, *TM, *TJ, JMM, GVsWithCode);
89 *ErrorStr = "target does not support JIT code generation";
98 SmallPtrSet<JIT*, 1> JITs; // Optimize for process containing just 1 JIT.
101 void Add(JIT *jit) {
103 JITs.insert(jit);
105 void Remove(JIT *jit) {
107 JITs.erase(jit);
111 assert(JITs.size() != 0 && "No Jit registered");
112 //search function in every instance of JIT
113 for (SmallPtrSet<JIT*, 1>::const_iterator Jit = JITs.begin(),
115 Jit != end; ++Jit) {
116 if (Function *F = (*Jit)->FindFunctionNamed(Name))
117 return (*Jit)->getPointerToFunction(F);
128 // JIT::getPointerToNamedFunction for the purpose of resolving symbols when
129 // bugpoint is debugging the JIT. In that scenario, we are loading an .so and
137 JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
168 JIT::~JIT() {
177 /// addModule - Add a new Module to the JIT. If we previously removed the last
179 void JIT::addModule(Module *M) {
206 bool JIT::removeModule(Module *M) {
237 GenericValue JIT::runFunction(Function *F,
408 void JIT::RegisterJITEventListener(JITEventListener *L) {
414 void JIT::UnregisterJITEventListener(JITEventListener *L) {
425 void JIT::NotifyFunctionEmitted(
435 void JIT::NotifyFreeingMachineCode(void *OldPtr) {
446 void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) {
469 void JIT::runJITOnFunctionUnlocked(Function *F) {
491 void JIT::jitTheFunctionUnlocked(Function *F) {
503 void *JIT::getPointerToFunction(Function *F) {
536 void JIT::addPointerToBasicBlock(const BasicBlock *BB, void *Addr) {
548 void JIT::clearPointerToBasicBlock(const BasicBlock *BB) {
553 void *JIT::getPointerToBasicBlock(BasicBlock *BB) {
554 // make sure it's function is compiled by JIT
565 llvm_unreachable("JIT does not have BB address for address-of-label, was"
570 void *JIT::getPointerToNamedFunction(const std::string &Name,
594 void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
626 /// just like JIT::getPointerToFunction().
628 void *JIT::recompileAndRelinkFunction(Function *F) {
648 /// variable so that the JIT can allocate thread local variables depending
651 char* JIT::getMemoryForGV(const GlobalVariable* GV) {
689 void JIT::addPendingFunction(Function *F) {