LLVM API Documentation
|
| typedef struct LLVMOpaqueExecutionEngine* LLVMExecutionEngineRef |
Definition at line 41 of file c/ExecutionEngine.h.
| typedef struct LLVMOpaqueGenericValue* LLVMGenericValueRef |
Definition at line 40 of file c/ExecutionEngine.h.
| typedef struct LLVMOpaqueMCJITMemoryManager* LLVMMCJITMemoryManagerRef |
Definition at line 42 of file c/ExecutionEngine.h.
| typedef uint8_t*(* LLVMMemoryManagerAllocateCodeSectionCallback)(void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName) |
Definition at line 175 of file c/ExecutionEngine.h.
| typedef uint8_t*(* LLVMMemoryManagerAllocateDataSectionCallback)(void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName, LLVMBool IsReadOnly) |
Definition at line 178 of file c/ExecutionEngine.h.
| typedef void(* LLVMMemoryManagerDestroyCallback)(void *Opaque) |
Definition at line 183 of file c/ExecutionEngine.h.
| typedef LLVMBool(* LLVMMemoryManagerFinalizeMemoryCallback)(void *Opaque, char **ErrMsg) |
Definition at line 181 of file c/ExecutionEngine.h.
| void LLVMAddGlobalMapping | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | Global, | ||
| void * | Addr | ||
| ) |
Definition at line 319 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| void LLVMAddModule | ( | LLVMExecutionEngineRef | EE, |
| LLVMModuleRef | M | ||
| ) |
Definition at line 271 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
Referenced by LLVMAddModuleProvider().
| void LLVMAddModuleProvider | ( | LLVMExecutionEngineRef | EE, |
| LLVMModuleProviderRef | MP | ||
| ) |
Deprecated: Use LLVMAddModule instead.
Definition at line 275 of file ExecutionEngineBindings.cpp.
References LLVMAddModule().
| LLVMBool LLVMCreateExecutionEngine | ( | LLVMExecutionEngineRef * | OutEE, |
| LLVMModuleProviderRef | MP, | ||
| char ** | OutError | ||
| ) |
Deprecated: Use LLVMCreateExecutionEngineForModule instead.
Definition at line 200 of file ExecutionEngineBindings.cpp.
References LLVMCreateExecutionEngineForModule().
| LLVMBool LLVMCreateExecutionEngineForModule | ( | LLVMExecutionEngineRef * | OutEE, |
| LLVMModuleRef | M, | ||
| char ** | OutError | ||
| ) |
Definition at line 101 of file ExecutionEngineBindings.cpp.
References llvm::EngineBuilder::create(), llvm::EngineKind::Either, llvm::lltok::Error, llvm::EngineBuilder::setEngineKind(), llvm::EngineBuilder::setErrorStr(), llvm::LibFunc::strdup, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMCreateExecutionEngine().
| LLVMGenericValueRef LLVMCreateGenericValueOfFloat | ( | LLVMTypeRef | Ty, |
| double | N | ||
| ) |
Definition at line 52 of file ExecutionEngineBindings.cpp.
References llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, getTypeID(), llvm_unreachable, llvm::unwrap(), and llvm::wrap().
| LLVMGenericValueRef LLVMCreateGenericValueOfInt | ( | LLVMTypeRef | Ty, |
| unsigned long long | N, | ||
| LLVMBool | IsSigned | ||
| ) |
Definition at line 38 of file ExecutionEngineBindings.cpp.
References getBitWidth(), llvm::GenericValue::IntVal, and llvm::wrap().
| LLVMGenericValueRef LLVMCreateGenericValueOfPointer | ( | void * | P | ) |
Definition at line 46 of file ExecutionEngineBindings.cpp.
References llvm::GenericValue::PointerVal, and llvm::wrap().
| LLVMBool LLVMCreateInterpreter | ( | LLVMExecutionEngineRef * | OutInterp, |
| LLVMModuleProviderRef | MP, | ||
| char ** | OutError | ||
| ) |
Deprecated: Use LLVMCreateInterpreterForModule instead.
Definition at line 209 of file ExecutionEngineBindings.cpp.
References LLVMCreateInterpreterForModule().
| LLVMBool LLVMCreateInterpreterForModule | ( | LLVMExecutionEngineRef * | OutInterp, |
| LLVMModuleRef | M, | ||
| char ** | OutError | ||
| ) |
Definition at line 116 of file ExecutionEngineBindings.cpp.
References llvm::EngineBuilder::create(), llvm::lltok::Error, llvm::EngineKind::Interpreter, llvm::EngineBuilder::setEngineKind(), llvm::EngineBuilder::setErrorStr(), llvm::LibFunc::strdup, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMCreateInterpreter().
| LLVMBool LLVMCreateJITCompiler | ( | LLVMExecutionEngineRef * | OutJIT, |
| LLVMModuleProviderRef | MP, | ||
| unsigned | OptLevel, | ||
| char ** | OutError | ||
| ) |
Deprecated: Use LLVMCreateJITCompilerForModule instead.
Definition at line 218 of file ExecutionEngineBindings.cpp.
References LLVMCreateJITCompilerForModule().
| LLVMBool LLVMCreateJITCompilerForModule | ( | LLVMExecutionEngineRef * | OutJIT, |
| LLVMModuleRef | M, | ||
| unsigned | OptLevel, | ||
| char ** | OutError | ||
| ) |
Definition at line 131 of file ExecutionEngineBindings.cpp.
References llvm::EngineBuilder::create(), llvm::lltok::Error, llvm::EngineKind::JIT, llvm::EngineBuilder::setEngineKind(), llvm::EngineBuilder::setErrorStr(), llvm::EngineBuilder::setOptLevel(), llvm::LibFunc::strdup, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMCreateJITCompiler().
| LLVMBool LLVMCreateMCJITCompilerForModule | ( | LLVMExecutionEngineRef * | OutJIT, |
| LLVMModuleRef | M, | ||
| struct LLVMMCJITCompilerOptions * | Options, | ||
| size_t | SizeOfOptions, | ||
| char ** | OutError | ||
| ) |
Create an MCJIT execution engine for a module, with the given options. It is the responsibility of the caller to ensure that all fields in Options up to the given SizeOfOptions are initialized. It is correct to pass a smaller value of SizeOfOptions that omits some fields. The canonical way of using this is:
LLVMMCJITCompilerOptions options; LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); ... fill in those options you care about LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options), &error);
Note that this is also correct, though possibly suboptimal:
LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error);
Definition at line 158 of file ExecutionEngineBindings.cpp.
References LLVMMCJITCompilerOptions::CodeModel, llvm::EngineBuilder::create(), LLVMMCJITCompilerOptions::EnableFastISel, llvm::TargetOptions::EnableFastISel, llvm::lltok::Error, llvm::EngineKind::JIT, LLVMInitializeMCJITCompilerOptions(), LLVMMCJITCompilerOptions::MCJMM, llvm::LibFunc::memcpy, LLVMMCJITCompilerOptions::NoFramePointerElim, llvm::TargetOptions::NoFramePointerElim, LLVMMCJITCompilerOptions::OptLevel, llvm::EngineBuilder::setCodeModel(), llvm::EngineBuilder::setEngineKind(), llvm::EngineBuilder::setErrorStr(), llvm::EngineBuilder::setMCJITMemoryManager(), llvm::EngineBuilder::setOptLevel(), llvm::EngineBuilder::setTargetOptions(), llvm::LibFunc::strdup, llvm::unwrap(), and llvm::wrap().
| LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager | ( | void * | Opaque, |
| LLVMMemoryManagerAllocateCodeSectionCallback | AllocateCodeSection, | ||
| LLVMMemoryManagerAllocateDataSectionCallback | AllocateDataSection, | ||
| LLVMMemoryManagerFinalizeMemoryCallback | FinalizeMemory, | ||
| LLVMMemoryManagerDestroyCallback | Destroy | ||
| ) |
Create a simple custom MCJIT memory manager. This memory manager can intercept allocations in a module-oblivious way. This will return NULL if any of the passed functions are NULL.
| Opaque | An opaque client object to pass back to the callbacks. |
| AllocateCodeSection | Allocate a block of memory for executable code. |
| AllocateDataSection | Allocate a block of memory for data. |
| FinalizeMemory | Set page permissions and flush cache. Return 0 on success, 1 on error. |
Definition at line 410 of file ExecutionEngineBindings.cpp.
References functions, and llvm::wrap().
| void LLVMDisposeExecutionEngine | ( | LLVMExecutionEngineRef | EE | ) |
Definition at line 229 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| void LLVMDisposeGenericValue | ( | LLVMGenericValueRef | GenVal | ) |
Definition at line 95 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
Definition at line 429 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| LLVMBool LLVMFindFunction | ( | LLVMExecutionEngineRef | EE, |
| const char * | Name, | ||
| LLVMValueRef * | OutFn | ||
| ) |
Definition at line 296 of file ExecutionEngineBindings.cpp.
References F(), llvm::unwrap(), and llvm::wrap().
| void LLVMFreeMachineCodeForFunction | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | F | ||
| ) |
Definition at line 268 of file ExecutionEngineBindings.cpp.
| unsigned LLVMGenericValueIntWidth | ( | LLVMGenericValueRef | GenValRef | ) |
Definition at line 67 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| double LLVMGenericValueToFloat | ( | LLVMTypeRef | TyRef, |
| LLVMGenericValueRef | GenVal | ||
| ) |
Definition at line 84 of file ExecutionEngineBindings.cpp.
References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, getTypeID(), llvm_unreachable, and llvm::unwrap().
| unsigned long long LLVMGenericValueToInt | ( | LLVMGenericValueRef | GenVal, |
| LLVMBool | IsSigned | ||
| ) |
Definition at line 71 of file ExecutionEngineBindings.cpp.
References llvm::APInt::getSExtValue(), llvm::APInt::getZExtValue(), llvm::GenericValue::IntVal, and llvm::unwrap().
| void* LLVMGenericValueToPointer | ( | LLVMGenericValueRef | GenVal | ) |
Definition at line 80 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
Definition at line 310 of file ExecutionEngineBindings.cpp.
References llvm::unwrap(), and llvm::wrap().
Definition at line 315 of file ExecutionEngineBindings.cpp.
References llvm::unwrap(), and llvm::wrap().
| void* LLVMGetPointerToGlobal | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | Global | ||
| ) |
Definition at line 324 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| void LLVMInitializeMCJITCompilerOptions | ( | struct LLVMMCJITCompilerOptions * | Options, |
| size_t | SizeOfOptions | ||
| ) |
Definition at line 148 of file ExecutionEngineBindings.cpp.
References LLVMMCJITCompilerOptions::CodeModel, LLVMCodeModelJITDefault, llvm::LibFunc::memcpy, and llvm::LibFunc::memset.
Referenced by LLVMCreateMCJITCompilerForModule().
| void LLVMLinkInInterpreter | ( | void | ) |
Definition at line 31 of file Interpreter.cpp.
| void LLVMLinkInMCJIT | ( | void | ) |
| void* LLVMRecompileAndRelinkFunction | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | Fn | ||
| ) |
Definition at line 305 of file ExecutionEngineBindings.cpp.
| LLVMBool LLVMRemoveModule | ( | LLVMExecutionEngineRef | EE, |
| LLVMModuleRef | M, | ||
| LLVMModuleRef * | OutMod, | ||
| char ** | OutError | ||
| ) |
Definition at line 280 of file ExecutionEngineBindings.cpp.
References llvm::unwrap(), and llvm::wrap().
Referenced by LLVMRemoveModuleProvider().
| LLVMBool LLVMRemoveModuleProvider | ( | LLVMExecutionEngineRef | EE, |
| LLVMModuleProviderRef | MP, | ||
| LLVMModuleRef * | OutMod, | ||
| char ** | OutError | ||
| ) |
Deprecated: Use LLVMRemoveModule instead.
Definition at line 288 of file ExecutionEngineBindings.cpp.
References LLVMRemoveModule().
| LLVMGenericValueRef LLVMRunFunction | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | F, | ||
| unsigned | NumArgs, | ||
| LLVMGenericValueRef * | Args | ||
| ) |
Definition at line 253 of file ExecutionEngineBindings.cpp.
References I, llvm::unwrap(), and llvm::wrap().
| int LLVMRunFunctionAsMain | ( | LLVMExecutionEngineRef | EE, |
| LLVMValueRef | F, | ||
| unsigned | ArgC, | ||
| const char *const * | ArgV, | ||
| const char *const * | EnvP | ||
| ) |
Definition at line 241 of file ExecutionEngineBindings.cpp.
References I, and llvm::unwrap().
| void LLVMRunStaticConstructors | ( | LLVMExecutionEngineRef | EE | ) |
Definition at line 233 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().
| void LLVMRunStaticDestructors | ( | LLVMExecutionEngineRef | EE | ) |
Definition at line 237 of file ExecutionEngineBindings.cpp.
References llvm::unwrap().