LLVM API Documentation
#include <JIT.h>
Inheritance diagram for llvm::JIT:
Public Member Functions | |
~JIT () | |
TargetJITInfo & | getJITInfo () const |
virtual GenericValue | runFunction (Function *F, const std::vector< GenericValue > &ArgValues) |
void * | getPointerToNamedFunction (const std::string &Name) |
void * | getPointerToFunction (Function *F) |
void * | getOrEmitGlobalVariable (const GlobalVariable *GV) |
void * | getPointerToFunctionOrStub (Function *F) |
void * | recompileAndRelinkFunction (Function *F) |
void | freeMachineCodeForFunction (Function *F) |
Static Public Member Functions | |
static ExecutionEngine * | create (ModuleProvider *MP, IntrinsicLowering *IL=0) |
static void | CompilationCallback () |
Definition at line 30 of file JIT.h.
|
|
|
|
|
create - Create an return a new JIT compiler if there is one available for the current target. Otherwise, return null. If the JIT is created successfully, it takes responsibility for deleting the specified IntrinsicLowering implementation. Definition at line 29 of file TargetSelect.cpp. References Error(), llvm::TargetMachineRegistry::getClosestTargetForJIT(), llvm::TargetMachine::getJITInfo(), llvm::ModuleProvider::getModule(), MArch, and Target. Referenced by llvm::ExecutionEngine::create(). |
|
freeMachineCodeForFunction - deallocate memory used to code-generate this Function. Implements llvm::ExecutionEngine. |
|
getJITInfo - Return the target JIT information structure. |
|
getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed. This is used by the Emitter. Reimplemented from llvm::ExecutionEngine. Definition at line 271 of file JIT.cpp. References abort(), llvm::ExecutionEngine::addGlobalMapping(), llvm::SequentialType::getElementType(), llvm::Value::getName(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), llvm::ExecutionEngine::getTargetData(), llvm::GlobalValue::getType(), llvm::TargetData::getTypeSize(), llvm::GlobalVariable::isExternal(), and llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(). |
|
getPointerToFunction - This returns the address of the specified function, compiling it if necessary. Implements llvm::ExecutionEngine. Definition at line 237 of file JIT.cpp. References abort(), llvm::ExecutionEngine::addGlobalMapping(), llvm::Value::getName(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), getPointerToNamedFunction(), llvm::GlobalValue::hasNotBeenReadFromBytecode(), llvm::Function::isExternal(), and llvm::ModuleProvider::materializeFunction(). Referenced by getPointerToNamedFunction(), recompileAndRelinkFunction(), and runFunction(). |
|
getPointerToFunctionOrStub - If the specified function has been code-gen'd, return a pointer to the function. If not, compile it, or use a stub to implement lazy compilation if available. Reimplemented from llvm::ExecutionEngine. Definition at line 215 of file JITEmitter.cpp. References getJITResolver(), and llvm::ExecutionEngine::getPointerToGlobalIfAvailable(). |
|
getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. As such it is only useful for resolving library symbols, not code generated symbols. Definition at line 89 of file Intercept.cpp. References __mainFunc(), abort(), jit_atexit(), jit_exit(), and llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(). Referenced by getPointerToFunction(), and getPointerToNamedFunction(). |
|
recompileAndRelinkFunction - This method is used to force a function which has already been compiled, to be compiled again, possibly after it has been modified. Then the entry to the old copy is overwritten with a branch to the new copy. If there was no old copy, this acts just like JIT::getPointerToFunction(). Implements llvm::ExecutionEngine. Definition at line 301 of file JIT.cpp. References llvm::ExecutionEngine::addGlobalMapping(), getPointerToFunction(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), and llvm::TargetJITInfo::replaceMachineCodeForFunction(). |
|