Project Alice
|
Modules | |
LLJIT | |
On-Request-Compilation | |
ExecutionEngine-based ORC Utils | |
Classes | |
struct | LLVMMCJITCompilerOptions |
Typedefs | |
typedef struct LLVMOpaqueGenericValue * | LLVMGenericValueRef |
typedef struct LLVMOpaqueExecutionEngine * | LLVMExecutionEngineRef |
typedef struct LLVMOpaqueMCJITMemoryManager * | LLVMMCJITMemoryManagerRef |
typedef uint8_t *(* | LLVMMemoryManagerAllocateCodeSectionCallback) (void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName) |
typedef uint8_t *(* | LLVMMemoryManagerAllocateDataSectionCallback) (void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName, LLVMBool IsReadOnly) |
typedef LLVMBool(* | LLVMMemoryManagerFinalizeMemoryCallback) (void *Opaque, char **ErrMsg) |
typedef void(* | LLVMMemoryManagerDestroyCallback) (void *Opaque) |
typedef struct LLVMOpaqueExecutionEngine* LLVMExecutionEngineRef |
Definition at line 40 of file ExecutionEngine.h.
typedef struct LLVMOpaqueGenericValue* LLVMGenericValueRef |
Definition at line 39 of file ExecutionEngine.h.
typedef struct LLVMOpaqueMCJITMemoryManager* LLVMMCJITMemoryManagerRef |
Definition at line 41 of file ExecutionEngine.h.
typedef uint8_t *(* LLVMMemoryManagerAllocateCodeSectionCallback) (void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName) |
Definition at line 159 of file ExecutionEngine.h.
typedef uint8_t *(* LLVMMemoryManagerAllocateDataSectionCallback) (void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, const char *SectionName, LLVMBool IsReadOnly) |
Definition at line 162 of file ExecutionEngine.h.
typedef void(* LLVMMemoryManagerDestroyCallback) (void *Opaque) |
Definition at line 167 of file ExecutionEngine.h.
typedef LLVMBool(* LLVMMemoryManagerFinalizeMemoryCallback) (void *Opaque, char **ErrMsg) |
Definition at line 165 of file ExecutionEngine.h.
void LLVMAddGlobalMapping | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | Global, | ||
void * | Addr | ||
) |
void LLVMAddModule | ( | LLVMExecutionEngineRef | EE, |
LLVMModuleRef | M | ||
) |
LLVMBool LLVMCreateExecutionEngineForModule | ( | LLVMExecutionEngineRef * | OutEE, |
LLVMModuleRef | M, | ||
char ** | OutError | ||
) |
LLVMJITEventListenerRef LLVMCreateGDBRegistrationListener | ( | void | ) |
LLVMGenericValueRef LLVMCreateGenericValueOfFloat | ( | LLVMTypeRef | Ty, |
double | N | ||
) |
LLVMGenericValueRef LLVMCreateGenericValueOfInt | ( | LLVMTypeRef | Ty, |
unsigned long long | N, | ||
LLVMBool | IsSigned | ||
) |
LLVMGenericValueRef LLVMCreateGenericValueOfPointer | ( | void * | P | ) |
LLVMJITEventListenerRef LLVMCreateIntelJITEventListener | ( | void | ) |
LLVMBool LLVMCreateInterpreterForModule | ( | LLVMExecutionEngineRef * | OutInterp, |
LLVMModuleRef | M, | ||
char ** | OutError | ||
) |
LLVMBool LLVMCreateJITCompilerForModule | ( | LLVMExecutionEngineRef * | OutJIT, |
LLVMModuleRef | M, | ||
unsigned | OptLevel, | ||
char ** | OutError | ||
) |
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);
LLVMJITEventListenerRef LLVMCreateOProfileJITEventListener | ( | void | ) |
LLVMJITEventListenerRef LLVMCreatePerfJITEventListener | ( | void | ) |
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. |
void LLVMDisposeExecutionEngine | ( | LLVMExecutionEngineRef | EE | ) |
void LLVMDisposeGenericValue | ( | LLVMGenericValueRef | GenVal | ) |
void LLVMDisposeMCJITMemoryManager | ( | LLVMMCJITMemoryManagerRef | MM | ) |
LLVMBool LLVMExecutionEngineGetErrMsg | ( | LLVMExecutionEngineRef | EE, |
char ** | OutError | ||
) |
Returns true on error, false on success. If true is returned then the error message is copied to OutStr and cleared in the ExecutionEngine instance.
LLVMBool LLVMFindFunction | ( | LLVMExecutionEngineRef | EE, |
const char * | Name, | ||
LLVMValueRef * | OutFn | ||
) |
void LLVMFreeMachineCodeForFunction | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | F | ||
) |
unsigned LLVMGenericValueIntWidth | ( | LLVMGenericValueRef | GenValRef | ) |
double LLVMGenericValueToFloat | ( | LLVMTypeRef | TyRef, |
LLVMGenericValueRef | GenVal | ||
) |
unsigned long long LLVMGenericValueToInt | ( | LLVMGenericValueRef | GenVal, |
LLVMBool | IsSigned | ||
) |
void * LLVMGenericValueToPointer | ( | LLVMGenericValueRef | GenVal | ) |
LLVMTargetDataRef LLVMGetExecutionEngineTargetData | ( | LLVMExecutionEngineRef | EE | ) |
LLVMTargetMachineRef LLVMGetExecutionEngineTargetMachine | ( | LLVMExecutionEngineRef | EE | ) |
uint64_t LLVMGetFunctionAddress | ( | LLVMExecutionEngineRef | EE, |
const char * | Name | ||
) |
uint64_t LLVMGetGlobalValueAddress | ( | LLVMExecutionEngineRef | EE, |
const char * | Name | ||
) |
void * LLVMGetPointerToGlobal | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | Global | ||
) |
void LLVMInitializeMCJITCompilerOptions | ( | struct LLVMMCJITCompilerOptions * | Options, |
size_t | SizeOfOptions | ||
) |
void LLVMLinkInInterpreter | ( | void | ) |
void LLVMLinkInMCJIT | ( | void | ) |
void * LLVMRecompileAndRelinkFunction | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | Fn | ||
) |
LLVMBool LLVMRemoveModule | ( | LLVMExecutionEngineRef | EE, |
LLVMModuleRef | M, | ||
LLVMModuleRef * | OutMod, | ||
char ** | OutError | ||
) |
LLVMGenericValueRef LLVMRunFunction | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | F, | ||
unsigned | NumArgs, | ||
LLVMGenericValueRef * | Args | ||
) |
int LLVMRunFunctionAsMain | ( | LLVMExecutionEngineRef | EE, |
LLVMValueRef | F, | ||
unsigned | ArgC, | ||
const char *const * | ArgV, | ||
const char *const * | EnvP | ||
) |
void LLVMRunStaticConstructors | ( | LLVMExecutionEngineRef | EE | ) |
void LLVMRunStaticDestructors | ( | LLVMExecutionEngineRef | EE | ) |