LLVM API Documentation
#include <ExecutionEngine.h>
Definition at line 67 of file ExecutionEngine/ExecutionEngine.h.
typedef void(* llvm::ExecutionEngine::EERegisterFn)(void *) [protected] |
| ExecutionEngine::~ExecutionEngine | ( | ) | [virtual] |
Definition at line 59 of file ExecutionEngine.cpp.
References clearAllGlobalMappings(), and Modules.
| ExecutionEngine::ExecutionEngine | ( | ModuleProvider * | P | ) | [explicit, protected] |
| void llvm::ExecutionEngine::setTargetData | ( | const TargetData * | td | ) | [inline, protected] |
Definition at line 82 of file ExecutionEngine/ExecutionEngine.h.
References TD.
Referenced by llvm::Interpreter::Interpreter().
| char * ExecutionEngine::getMemoryForGV | ( | const GlobalVariable * | GV | ) | [protected, virtual] |
getMemoryforGV - Allocate memory for a global variable.
Reimplemented in llvm::JIT.
Definition at line 65 of file ExecutionEngine.cpp.
References llvm::SequentialType::getElementType(), getTargetData(), llvm::GlobalValue::getType(), and llvm::TargetData::getTypeAllocSize().
Referenced by emitGlobals(), and EmitGlobalVariable().
| ExecutionEngine * ExecutionEngine::create | ( | ModuleProvider * | MP, | |
| bool | ForceInterpreter = false, |
|||
| std::string * | ErrorStr = 0, |
|||
| CodeGenOpt::Level | OptLevel = CodeGenOpt::Default, |
|||
| bool | GVsWithCode = true | |||
| ) | [static] |
create - This is the factory method for creating an execution engine which is appropriate for the current machine. This takes ownership of the module provider.
If possible, create a JIT, unless the caller specifically requests an Interpreter or there's an error. If even an Interpreter cannot be created, NULL is returned.
Definition at line 394 of file ExecutionEngine.cpp.
References EngineBuilder, llvm::EngineKind::Interpreter, and llvm::EngineKind::JIT.
| ExecutionEngine * ExecutionEngine::create | ( | Module * | M | ) | [static] |
create - This is the factory method for creating an execution engine which is appropriate for the current machine. This takes ownership of the module.
Definition at line 409 of file ExecutionEngine.cpp.
References EngineBuilder.
| ExecutionEngine * ExecutionEngine::createJIT | ( | ModuleProvider * | MP, | |
| std::string * | ErrorStr = 0, |
|||
| JITMemoryManager * | JMM = 0, |
|||
| CodeGenOpt::Level | OptLevel = CodeGenOpt::Default, |
|||
| bool | GVsWithCode = true | |||
| ) | [static] |
createJIT - This is the factory method for creating a JIT for the current machine, it does not fall back to the interpreter. This takes ownership of the ModuleProvider and JITMemoryManager if successful.
Clients should make sure to initialize targets prior to calling this function.
createJIT - This is the factory method for creating a JIT for the current machine, it does not fall back to the interpreter. This takes ownership of the module provider.
Reimplemented in llvm::JIT.
Definition at line 197 of file JIT.cpp.
References llvm::JIT::createJIT().
Referenced by llvm::JIT::create().
| virtual void llvm::ExecutionEngine::addModuleProvider | ( | ModuleProvider * | P | ) | [inline, virtual] |
addModuleProvider - Add a ModuleProvider to the list of modules that we can JIT from. Note that this takes ownership of the ModuleProvider: when the ExecutionEngine is destroyed, it destroys the MP as well.
Reimplemented in llvm::JIT.
Definition at line 161 of file ExecutionEngine/ExecutionEngine.h.
References Modules.
Referenced by llvm::JIT::addModuleProvider().
| const TargetData* llvm::ExecutionEngine::getTargetData | ( | ) | const [inline] |
Definition at line 167 of file ExecutionEngine/ExecutionEngine.h.
References TD.
Referenced by llvm::Interpreter::callExternalFunction(), CreateArgv(), EmitGlobalVariable(), llvm::JIT::getMemoryForGV(), getMemoryForGV(), InitializeMemory(), lle_X_sprintf(), LoadValueFromMemory(), and StoreValueToMemory().
| Module * ExecutionEngine::removeModuleProvider | ( | ModuleProvider * | P, | |
| std::string * | ErrInfo = 0 | |||
| ) | [virtual] |
removeModuleProvider - Remove a ModuleProvider from the list of modules. Relases the Module from the ModuleProvider, materializing it in the process, and returns the materialized Module.
removeModuleProvider - Remove a ModuleProvider from the list of modules. Relases the Module from the ModuleProvider, materializing it in the process, and returns the materialized Module.
Reimplemented in llvm::JIT.
Definition at line 74 of file ExecutionEngine.cpp.
References clearGlobalMappingsFromModule(), E, llvm::ModuleProvider::getModule(), Modules, and llvm::ModuleProvider::releaseModule().
Referenced by llvm::JIT::removeModuleProvider().
| void ExecutionEngine::deleteModuleProvider | ( | ModuleProvider * | P, | |
| std::string * | ErrInfo = 0 | |||
| ) | [virtual] |
deleteModuleProvider - Remove a ModuleProvider from the list of modules, and deletes the ModuleProvider and owned Module. Avoids materializing the underlying module.
deleteModuleProvider - Remove a ModuleProvider from the list of modules, and deletes the ModuleProvider and owned Module. Avoids materializing the underlying module.
Reimplemented in llvm::JIT.
Definition at line 91 of file ExecutionEngine.cpp.
References clearGlobalMappingsFromModule(), E, llvm::ModuleProvider::getModule(), and Modules.
Referenced by llvm::JIT::deleteModuleProvider().
| Function * ExecutionEngine::FindFunctionNamed | ( | const char * | FnName | ) |
FindFunctionNamed - Search all of the active modules to find the one that defines FnName. This is very slow operation and shouldn't be used for general code.
FindFunctionNamed - Search all of the active modules to find the one that defines FnName. This is very slow operation and shouldn't be used for general code.
Definition at line 108 of file ExecutionEngine.cpp.
Referenced by getPointerToNamedFunction().
| virtual GenericValue llvm::ExecutionEngine::runFunction | ( | Function * | F, | |
| const std::vector< GenericValue > & | ArgValues | |||
| ) | [pure virtual] |
runFunction - Execute the specified function with the specified arguments, and return the result.
Implemented in llvm::Interpreter, and llvm::JIT.
Referenced by runFunctionAsMain(), and runStaticConstructorsDestructors().
| void ExecutionEngine::runStaticConstructorsDestructors | ( | bool | isDtors | ) |
runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program, depending on the value of isDtors.
runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program, depending on the value of isDtors.
Definition at line 312 of file ExecutionEngine.cpp.
References Modules.
runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a module, depending on the value of isDtors.
runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a module, depending on the value of isDtors.
Definition at line 273 of file ExecutionEngine.cpp.
References llvm::dyn_cast(), F, llvm::GlobalVariable::getInitializer(), llvm::Module::getNamedGlobal(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), GV, llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalVariable::isDeclaration(), llvm::Constant::isNullValue(), Name, and runFunction().
| int ExecutionEngine::runFunctionAsMain | ( | Function * | Fn, | |
| const std::vector< std::string > & | argv, | |||
| const char *const * | envp | |||
| ) |
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.
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 332 of file ExecutionEngine.cpp.
References CreateArgv(), llvm::Function::getContext(), llvm::Type::getContext(), llvm::Function::getFunctionType(), llvm::Type::getInt32Ty(), llvm::Type::getInt8Ty(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), llvm::APInt::getZExtValue(), llvm::GVTOP(), llvm::GenericValue::IntVal, isTargetNullPtr(), llvm::llvm_report_error(), llvm::PTOGV(), and runFunction().
| void ExecutionEngine::addGlobalMapping | ( | const GlobalValue * | GV, | |
| void * | Addr | |||
| ) |
addGlobalMapping - Tell the execution engine that the specified global is at the specified location. This is used internally as functions are JIT'd and as global variables are laid out in memory. It can and should also be used by clients of the EE that want to have an LLVM global overlay existing data in memory. After adding a mapping for GV, you must not destroy it until you've removed the mapping.
addGlobalMapping - Tell the execution engine that the specified global is at the specified location. This is used internally as functions are JIT'd and as global variables are laid out in memory. It can and should also be used by clients of the EE that want to have an LLVM global overlay existing data in memory.
Definition at line 122 of file ExecutionEngine.cpp.
References DEBUG, llvm::errs(), llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), llvm::Value::getName(), lock, and V.
Referenced by emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), and llvm::JIT::recompileAndRelinkFunction().
| void ExecutionEngine::clearAllGlobalMappings | ( | ) |
clearAllGlobalMappings - Clear all global mappings and start over again use in dynamic compilation scenarios when you want to move globals
clearAllGlobalMappings - Clear all global mappings and start over again use in dynamic compilation scenarios when you want to move globals
Definition at line 142 of file ExecutionEngine.cpp.
References llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), and lock.
Referenced by ~ExecutionEngine().
| void ExecutionEngine::clearGlobalMappingsFromModule | ( | Module * | M | ) |
clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT.
clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT.
Definition at line 151 of file ExecutionEngine.cpp.
References llvm::Module::begin(), llvm::Module::end(), FI, GE, llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), llvm::Module::global_begin(), llvm::Module::global_end(), and lock.
Referenced by deleteModuleProvider(), and removeModuleProvider().
| void * ExecutionEngine::updateGlobalMapping | ( | const GlobalValue * | GV, | |
| void * | Addr | |||
| ) |
updateGlobalMapping - Replace an existing mapping for GV with a new address. This updates both maps as required. If "Addr" is null, the entry for the global is removed from the mappings. This returns the old value of the pointer, or null if it was not in the map.
updateGlobalMapping - Replace an existing mapping for GV with a new address. This updates both maps as required. If "Addr" is null, the entry for the global is removed from the mappings.
Definition at line 168 of file ExecutionEngine.cpp.
References llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), lock, and V.
Referenced by llvm::JIT::freeMachineCodeForFunction().
| void * ExecutionEngine::getPointerToGlobalIfAvailable | ( | const GlobalValue * | GV | ) |
getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is has already been codegen'd, otherwise it returns null.
getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is has already been codegen'd, otherwise it returns null.
Definition at line 210 of file ExecutionEngine.cpp.
References llvm::ExecutionEngineState::getGlobalAddressMap(), and lock.
Referenced by emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), llvm::JIT::getPointerToFunctionOrStub(), and llvm::JIT::recompileAndRelinkFunction().
| void * ExecutionEngine::getPointerToGlobal | ( | const GlobalValue * | GV | ) |
getPointerToGlobal - This returns the address of the specified global value. This may involve code generation if it's a function. After getting a pointer to GV, it and all globals it transitively refers to have been passed to addGlobalMapping. You must clear the mapping for each referred-to global before destroying it. If a referred-to global RTG is a function and this ExecutionEngine is a JIT compiler, calling updateGlobalMapping(RTG, 0) will leak the function's machine code, so you should call freeMachineCodeForFunction(RTG) instead. Note that optimizations can move and delete non-external GlobalValues without notifying the ExecutionEngine.
getPointerToGlobal - This returns the address of the specified global value. This may involve code generation if it's a function.
Definition at line 458 of file ExecutionEngine.cpp.
References EmitGlobalVariable(), F, llvm::ExecutionEngineState::getGlobalAddressMap(), getPointerToFunction(), llvm_unreachable, and lock.
Referenced by getOrEmitGlobalVariable().
| virtual void* llvm::ExecutionEngine::getPointerToFunction | ( | Function * | F | ) | [pure virtual] |
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. See getPointerToGlobal for the requirements on destroying F and any GlobalValues it refers to.
Implemented in llvm::JIT.
Referenced by getPointerToFunctionOrStub(), and getPointerToGlobal().
| virtual void* llvm::ExecutionEngine::getPointerToFunctionOrStub | ( | Function * | F | ) | [inline, virtual] |
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. See getPointerToGlobal for the requirements on destroying F and any GlobalValues it refers to.
Reimplemented in llvm::JIT.
Definition at line 262 of file ExecutionEngine/ExecutionEngine.h.
References getPointerToFunction().
Referenced by getConstantValue().
| virtual void llvm::ExecutionEngine::runJITOnFunction | ( | Function * | , | |
| MachineCodeInfo * | = 0 | |||
| ) | [inline, virtual] |
| const GlobalValue * ExecutionEngine::getGlobalValueAtAddress | ( | void * | Addr | ) |
getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address.
getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address.
Definition at line 221 of file ExecutionEngine.cpp.
References E, llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), and lock.
| void ExecutionEngine::StoreValueToMemory | ( | const GenericValue & | Val, | |
| GenericValue * | Ptr, | |||
| const Type * | Ty | |||
| ) |
StoreValueToMemory - Stores the data in Val of type Ty at address Ptr. Ptr is the address of the memory at which to store Val, cast to GenericValue *. It is not a pointer to a GenericValue containing the address at which to store Val.
Definition at line 792 of file ExecutionEngine.cpp.
References llvm::cerr(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::APInt::getRawData(), getTargetData(), llvm::Type::getTypeID(), llvm::TargetData::getTypeStoreSize(), llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm::TargetData::isLittleEndian(), llvm::sys::isLittleEndianHost(), llvm::Intrinsic::memcpy, llvm::Intrinsic::memset, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, StoreIntToMemory(), and llvm::Type::X86_FP80TyID.
Referenced by ByteswapSCANFResults(), CreateArgv(), InitializeMemory(), and llvm::Interpreter::visitStoreInst().
| void ExecutionEngine::InitializeMemory | ( | const Constant * | Init, | |
| void * | Addr | |||
| ) |
Definition at line 901 of file ExecutionEngine.cpp.
References llvm::cerr(), CP, DEBUG, DOUT, llvm::Value::dump(), getConstantValue(), llvm::StructLayout::getElementOffset(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), llvm::TargetData::getStructLayout(), getTargetData(), llvm::Value::getType(), llvm::TargetData::getTypeAllocSize(), llvm::Type::isFirstClassType(), llvm_unreachable, llvm::Intrinsic::memset, StoreValueToMemory(), and Val.
Referenced by EmitGlobalVariable().
| virtual void* llvm::ExecutionEngine::recompileAndRelinkFunction | ( | Function * | F | ) | [pure virtual] |
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.
| virtual void llvm::ExecutionEngine::freeMachineCodeForFunction | ( | Function * | F | ) | [pure virtual] |
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.
| virtual void* llvm::ExecutionEngine::getOrEmitGlobalVariable | ( | const GlobalVariable * | GV | ) | [inline, virtual] |
getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed. This is used by the Emitter. See getPointerToGlobal for the requirements on destroying GV and any GlobalValues it refers to.
Reimplemented in llvm::JIT.
Definition at line 298 of file ExecutionEngine/ExecutionEngine.h.
References getPointerToGlobal().
Referenced by getConstantValue().
| virtual void llvm::ExecutionEngine::RegisterJITEventListener | ( | JITEventListener * | ) | [inline, virtual] |
Registers a listener to be called back on various events within the JIT. See JITEventListener.h for more details. Does not take ownership of the argument. The argument may be NULL, in which case these functions do nothing.
Reimplemented in llvm::JIT.
Definition at line 306 of file ExecutionEngine/ExecutionEngine.h.
| virtual void llvm::ExecutionEngine::UnregisterJITEventListener | ( | JITEventListener * | ) | [inline, virtual] |
| void llvm::ExecutionEngine::DisableLazyCompilation | ( | bool | Disabled = true |
) | [inline] |
DisableLazyCompilation - If called, the JIT will abort if lazy compilation is ever attempted.
Definition at line 311 of file ExecutionEngine/ExecutionEngine.h.
| bool llvm::ExecutionEngine::isLazyCompilationDisabled | ( | ) | const [inline] |
Definition at line 314 of file ExecutionEngine/ExecutionEngine.h.
| void llvm::ExecutionEngine::DisableGVCompilation | ( | bool | Disabled = true |
) | [inline] |
DisableGVCompilation - If called, the JIT will abort if it's asked to allocate space and populate a GlobalVariable that is not internal to the module.
Definition at line 321 of file ExecutionEngine/ExecutionEngine.h.
| bool llvm::ExecutionEngine::isGVCompilationDisabled | ( | ) | const [inline] |
Definition at line 324 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::JIT::getMemoryForGV().
| void llvm::ExecutionEngine::DisableSymbolSearching | ( | bool | Disabled = true |
) | [inline] |
DisableSymbolSearching - If called, the JIT will not try to lookup unknown symbols with dlsym. A client can still use InstallLazyFunctionCreator to resolve symbols in a custom way.
Definition at line 331 of file ExecutionEngine/ExecutionEngine.h.
| bool llvm::ExecutionEngine::isSymbolSearchingDisabled | ( | ) | const [inline] |
Definition at line 334 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::JIT::getPointerToNamedFunction().
| void llvm::ExecutionEngine::EnableDlsymStubs | ( | bool | Enabled = true |
) | [inline] |
EnableDlsymStubs -.
Definition at line 339 of file ExecutionEngine/ExecutionEngine.h.
References Enabled.
| bool llvm::ExecutionEngine::areDlsymStubsEnabled | ( | ) | const [inline] |
Definition at line 342 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::JIT::getOrEmitGlobalVariable(), and llvm::JIT::getPointerToFunction().
| void llvm::ExecutionEngine::InstallLazyFunctionCreator | ( | void *(*)(const std::string &) | P | ) | [inline] |
InstallLazyFunctionCreator - If an unknown function is needed, the specified function pointer is invoked to create it. If it returns null, the JIT will abort.
Definition at line 349 of file ExecutionEngine/ExecutionEngine.h.
References LazyFunctionCreator.
| static void llvm::ExecutionEngine::InstallExceptionTableRegister | ( | void(*)(void *) | F | ) | [inline, static] |
InstallExceptionTableRegister - The JIT will use the given function to register the exception tables it generates.
Definition at line 355 of file ExecutionEngine/ExecutionEngine.h.
References ExceptionTableRegister, and F.
| static void llvm::ExecutionEngine::RegisterTable | ( | void * | res | ) | [inline, static] |
RegisterTable - Registers the given pointer as an exception table. It uses the ExceptionTableRegister function.
Definition at line 361 of file ExecutionEngine/ExecutionEngine.h.
References ExceptionTableRegister.
| void ExecutionEngine::emitGlobals | ( | ) | [protected] |
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 941 of file ExecutionEngine.cpp.
References addGlobalMapping(), E, EmitGlobalVariable(), getMemoryForGV(), llvm::Value::getName(), getPointerToGlobalIfAvailable(), llvm::GlobalValue::getType(), llvm::Module::global_begin(), llvm::Module::global_end(), GV, llvm::GlobalValue::hasAppendingLinkage(), llvm::GlobalValue::hasDLLExportLinkage(), llvm::GlobalValue::hasDLLImportLinkage(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasExternalWeakLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::GlobalValue::isDeclaration(), llvm::llvm_report_error(), M, Modules, and llvm::sys::DynamicLibrary::SearchForAddressOfSymbol().
Referenced by llvm::Interpreter::Interpreter().
| void ExecutionEngine::EmitGlobalVariable | ( | const GlobalVariable * | GV | ) | [protected] |
Definition at line 1049 of file ExecutionEngine.cpp.
References addGlobalMapping(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), getMemoryForGV(), getPointerToGlobalIfAvailable(), getTargetData(), llvm::GlobalValue::getType(), llvm::TargetData::getTypeAllocSize(), InitializeMemory(), and llvm::GlobalVariable::isThreadLocal().
Referenced by emitGlobals(), llvm::JIT::getOrEmitGlobalVariable(), and getPointerToGlobal().
| GenericValue ExecutionEngine::getConstantValue | ( | const Constant * | C | ) | [protected] |
Get a GenericValue for a Constant*.
This function converts a Constant* into a GenericValue. The interesting part is if C is a ConstantExpr.
Definition at line 479 of file ExecutionEngine.cpp.
References llvm::APFloat::add(), llvm::APIntOps::And(), llvm::lltok::APFloat, BitCast, llvm::APFloat::bitcastToAPInt(), llvm::APInt::bitsToDouble(), llvm::APInt::bitsToFloat(), llvm::APFloat::convertFromAPInt(), llvm::APFloat::convertToInteger(), llvm::APFloat::divide(), llvm::APInt::doubleToBits(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, F, llvm::APInt::floatToBits(), llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::Type::FP128TyID, FPToUI, FPTrunc, llvm::APInt::getBitWidth(), llvm::Type::getContext(), llvm::Value::getContext(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::TargetData::getIndexedOffset(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getOrEmitGlobalVariable(), llvm::TargetData::getPointerSizeInBits(), getPointerToFunctionOrStub(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::Type::getX86_FP80Ty(), llvm::APInt::getZExtValue(), GV, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm::Type::isFloatingPoint(), LHS, llvm::llvm_report_error(), llvm_unreachable, llvm::APFloat::mod(), llvm::APFloat::multiply(), Offset, llvm::APIntOps::Or(), llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::Type::PPC_FP128TyID, llvm::PTOGV(), PtrToInt, RHS, llvm::APFloat::rmNearestTiesToEven, llvm::APFloat::rmTowardZero, llvm::APIntOps::RoundDoubleToAPInt(), llvm::APIntOps::RoundFloatToAPInt(), llvm::APInt::roundToDouble(), llvm::APInt::sdiv(), llvm::APInt::sext(), llvm::Attribute::SExt, llvm::APInt::signedRoundToDouble(), llvm::APInt::srem(), llvm::raw_string_ostream::str(), llvm::APFloat::subtract(), llvm::APInt::trunc(), llvm::APInt::udiv(), UIToFP, llvm::APInt::urem(), llvm::Type::X86_FP80TyID, llvm::APIntOps::Xor(), zero, llvm::APInt::zext(), ZExt, and llvm::APInt::zextOrTrunc().
Referenced by InitializeMemory().
| void ExecutionEngine::LoadValueFromMemory | ( | GenericValue & | Result, | |
| GenericValue * | Ptr, | |||
| const Type * | Ty | |||
| ) | [protected] |
FIXME: document
Definition at line 853 of file ExecutionEngine.cpp.
References llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, getTargetData(), llvm::Type::getTypeID(), llvm::TargetData::getTypeStoreSize(), llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm::sys::isLittleEndianHost(), llvm::llvm_report_error(), LoadIntFromMemory(), llvm::Intrinsic::memcpy, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, Src, llvm::raw_string_ostream::str(), and llvm::Type::X86_FP80TyID.
Referenced by llvm::Interpreter::visitLoadInst().
friend class EngineBuilder [friend] |
SmallVector<ModuleProvider*, 1> llvm::ExecutionEngine::Modules [protected] |
Modules - This is a list of ModuleProvider's that we are JIT'ing from. We use a smallvector to optimize for the case where there is only one module.
Definition at line 80 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::JIT::addModuleProvider(), addModuleProvider(), llvm::JIT::deleteModuleProvider(), deleteModuleProvider(), emitGlobals(), ExecutionEngine(), FindFunctionNamed(), llvm::JIT::getPointerToFunction(), llvm::JIT::removeModuleProvider(), removeModuleProvider(), runStaticConstructorsDestructors(), and ~ExecutionEngine().
| ExecutionEngine *(* ExecutionEngine::JITCtor)(ModuleProvider *MP, std::string *ErrorStr, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode)=0 | ( | ModuleProvider * | MP, | |
| std::string * | ErrorStr, | |||
| JITMemoryManager * | JMM, | |||
| CodeGenOpt::Level | OptLevel, | |||
| bool | GVsWithCode | |||
| ) | [static, protected] |
Referenced by llvm::EngineBuilder::create(), and llvm::JIT::Register().
| ExecutionEngine *(* ExecutionEngine::InterpCtor)(ModuleProvider *MP, std::string *ErrorStr)=0 | ( | ModuleProvider * | MP, | |
| std::string * | ErrorStr | |||
| ) | [static, protected] |
Referenced by llvm::EngineBuilder::create(), and llvm::Interpreter::Register().
void*(* llvm::ExecutionEngine::LazyFunctionCreator)(const std::string &) [protected] |
LazyFunctionCreator - If an unknown function is needed, this function pointer is invoked to create it. If this returns null, the JIT will abort.
Referenced by llvm::JIT::getPointerToNamedFunction(), and InstallLazyFunctionCreator().
ExecutionEngine::EERegisterFn ExecutionEngine::ExceptionTableRegister = 0 [static, protected] |
Definition at line 107 of file ExecutionEngine/ExecutionEngine.h.
Referenced by InstallExceptionTableRegister(), and RegisterTable().
lock - This lock is protects the ExecutionEngine, JIT, JITResolver and JITEmitter classes. It must be held while changing the internal state of any of those classes.
Definition at line 113 of file ExecutionEngine/ExecutionEngine.h.
Referenced by addGlobalMapping(), llvm::JIT::addModuleProvider(), llvm::JIT::addPendingFunction(), clearAllGlobalMappings(), clearGlobalMappingsFromModule(), llvm::JIT::deleteModuleProvider(), getGlobalValueAtAddress(), llvm::JIT::getMemoryForGV(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), getPointerToGlobal(), getPointerToGlobalIfAvailable(), llvm::JIT::NotifyFreeingMachineCode(), llvm::JIT::NotifyFunctionEmitted(), llvm::JIT::RegisterJITEventListener(), llvm::JIT::removeModuleProvider(), llvm::JIT::runJITOnFunction(), llvm::JIT::UnregisterJITEventListener(), and updateGlobalMapping().