LLVM API Documentation
#include <ExecutionEngine.h>
Inheritance diagram for llvm::ExecutionEngine:
Definition at line 36 of file ExecutionEngine.h.
|
Definition at line 36 of file ExecutionEngine.cpp. |
|
Definition at line 41 of file ExecutionEngine.cpp. |
|
Definition at line 45 of file ExecutionEngine.cpp. References MP. |
|
Definition at line 83 of file ExecutionEngine.h. References V. Referenced by emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), and llvm::JIT::recompileAndRelinkFunction(). |
|
create - This is the factory method for creating an execution engine which is appropriate for the current machine. If specified, the IntrinsicLowering implementation should be allocated on the heap. Definition at line 129 of file ExecutionEngine.cpp. References llvm::Interpreter::create(), llvm::JIT::create(), EE, llvm::sys::DynamicLibrary::LoadLibraryPermanently(), M, and llvm::ModuleProvider::materializeModule(). |
|
EmitGlobals - Emit all of the global variables to memory, storing their addresses into GlobalAddress. This must make sure to copy the contents of their initializers into the memory. Definition at line 494 of file ExecutionEngine.cpp. References abort(), addGlobalMapping(), E, EmitGlobalVariable(), getModule(), getTargetData(), llvm::TargetData::getTypeSize(), I, and llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(). Referenced by llvm::Interpreter::Interpreter(). |
|
Definition at line 532 of file ExecutionEngine.cpp. References addGlobalMapping(), DEBUG, llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::Value::getName(), getPointerToGlobalIfAvailable(), getTargetData(), llvm::GlobalValue::getType(), llvm::TargetData::getTypeSize(), InitializeMemory(), NumGlobals, and NumInitBytes. Referenced by emitGlobals(). |
|
freeMachineCodeForFunction - Release memory in the ExecutionEngine corresponding to the machine code emitted to execute this function, useful for garbage-collecting generated code. Implemented in llvm::Interpreter, and llvm::JIT. |
|
|
getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address. Definition at line 52 of file ExecutionEngine.cpp. |
|
Definition at line 61 of file ExecutionEngine.h. Referenced by emitGlobals(), getPointerToNamedFunction(), and lle_X_sprintf(). |
|
getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed. This is used by the Emitter. Reimplemented in llvm::JIT. Definition at line 166 of file ExecutionEngine.h. References getPointerToGlobal(). Referenced by getConstantValue(). |
|
getPointerToFunction - The different EE's represent function bodies in different ways. They should each implement this to say what a function pointer should look like. Implemented in llvm::JIT. Referenced by getPointerToFunctionOrStub(), and getPointerToGlobal(). |
|
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 in llvm::JIT. Definition at line 135 of file ExecutionEngine.h. References getPointerToFunction(). Referenced by getConstantValue(). |
|
getPointerToGlobal - This returns the address of the specified global value. This may involve code generation if it's a function. Definition at line 167 of file ExecutionEngine.cpp. References F, and getPointerToFunction(). Referenced by getOrEmitGlobalVariable(). |
|
getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is available, otherwise it returns null. Definition at line 115 of file ExecutionEngine.h. References I. Referenced by EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), llvm::JIT::getPointerToFunctionOrStub(), and llvm::JIT::recompileAndRelinkFunction(). |
|
Definition at line 62 of file ExecutionEngine.h. Referenced by CreateArgv(), emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), InitializeMemory(), LoadValueFromMemory(), and StoreValueToMemory(). |
|
|
|
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 VM::getPointerToFunction(). Implemented in llvm::Interpreter, and llvm::JIT. |
|
runFunction - Execute the specified function with the specified arguments, and return the result. Implemented in llvm::Interpreter, and llvm::JIT. Referenced by runChild(), and runFunctionAsMain(). |
|
runFunctionAsMain - This is a helper function which wraps runFunction to handle the common task of starting up main with the specified argc, argv, and envp parameters. Definition at line 99 of file ExecutionEngine.cpp. References CreateArgv(), llvm::Function::getFunctionType(), llvm::FunctionType::getNumParams(), llvm::GVTOP(), llvm::GenericValue::IntVal, llvm::PTOGV(), and runFunction(). Referenced by runChild(). |
|
Definition at line 52 of file ExecutionEngine.h. Referenced by llvm::Interpreter::Interpreter(). |
|
|
updateGlobalMapping - Replace an existing mapping for GV with a new address. This updates both maps as required. Definition at line 98 of file ExecutionEngine.h. References V. |
|
Definition at line 50 of file ExecutionEngine.h. Referenced by ~ExecutionEngine(). |