Home | History | Annotate | Download | only in JIT

Lines Matching refs:JIT

1 //===-- JIT.cpp - LLVM Just in Time Compiler ------------------------------===//
15 #include "JIT.h"
62 RegisterJIT() { JIT::Register(); }
83 // function here so that code generated by the JIT cooperates with the unwinding
204 /// createJIT - This is the factory method for creating a JIT for the current
207 ExecutionEngine *JIT::createJIT(Module *M,
217 // If the target supports JIT code generation, create the JIT.
219 return new JIT(M, *TM, *TJ, JMM, GVsWithCode);
222 *ErrorStr = "target does not support JIT code generation";
231 SmallPtrSet<JIT*, 1> JITs; // Optimize for process containing just 1 JIT.
234 void Add(JIT *jit) {
236 JITs.insert(jit);
238 void Remove(JIT *jit) {
240 JITs.erase(jit);
244 assert(JITs.size() != 0 && "No Jit registered");
245 //search function in every instance of JIT
246 for (SmallPtrSet<JIT*, 1>::const_iterator Jit = JITs.begin(),
248 Jit != end; ++Jit) {
249 if (Function *F = (*Jit)->FindFunctionNamed(Name))
250 return (*Jit)->getPointerToFunction(F);
261 // JIT::getPointerToNamedFunction for the purpose of resolving symbols when
262 // bugpoint is debugging the JIT. In that scenario, we are loading an .so and
270 JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
320 JIT::~JIT() {
321 // Unregister all exception tables registered by this JIT.
331 /// addModule - Add a new Module to the JIT. If we previously removed the last
333 void JIT::addModule(Module *M) {
359 bool JIT::removeModule(Module *M) {
389 GenericValue JIT::runFunction(Function *F,
560 void JIT::RegisterJITEventListener(JITEventListener *L) {
566 void JIT::UnregisterJITEventListener(JITEventListener *L) {
577 void JIT::NotifyFunctionEmitted(
587 void JIT::NotifyFreeingMachineCode(void *OldPtr) {
598 void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) {
622 void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) {
644 void JIT::jitTheFunction(Function *F, const MutexGuard &locked) {
656 void *JIT::getPointerToFunction(Function *F) {
689 void JIT::addPointerToBasicBlock(const BasicBlock *BB, void *Addr) {
701 void JIT::clearPointerToBasicBlock(const BasicBlock *BB) {
706 void *JIT::getPointerToBasicBlock(BasicBlock *BB) {
707 // make sure it's function is compiled by JIT
718 llvm_unreachable("JIT does not have BB address for address-of-label, was"
723 void *JIT::getPointerToNamedFunction(const std::string &Name,
747 void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
779 /// just like JIT::getPointerToFunction().
781 void *JIT::recompileAndRelinkFunction(Function *F) {
801 /// variable so that the JIT can allocate thread local variables depending
804 char* JIT::getMemoryForGV(const GlobalVariable* GV) {
842 void JIT::addPendingFunction(Function *F) {