Top Inners Constructors Methods
org.lwjgl.llvm

public Class LLVMExecutionEngine

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LLVMExecutionEngine.Functions

Contains the function pointers loaded from LLVMCore.getLibrary().

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
LLVMAddGlobalMapping(long EE, long Global, long Addr)

public static void
LLVMAddModule(long EE, long M)

public static boolean
public static long
public static long
LLVMCreateGenericValueOfFloat(long Ty, double N)

public static long
LLVMCreateGenericValueOfInt(long Ty, long N, boolean IsSigned)

public static long
public static long
public static boolean
public static boolean
LLVMCreateJITCompilerForModule(PointerBuffer OutJIT, long M, int OptLevel, PointerBuffer OutError)

public static boolean
LLVMCreateMCJITCompilerForModule(PointerBuffer OutJIT, long M, LLVMMCJITCompilerOptions.Buffer Options, PointerBuffer OutError)

Create an MCJIT execution engine for a module, with the given options.

public static long
public static long
public static long
LLVMCreateSimpleMCJITMemoryManager(long
an opaque client object to pass back to the callbacks
Opaque
,
LLVMMemoryManagerAllocateCodeSectionCallbackI
allocate a block of memory for executable code
AllocateCodeSection
,
LLVMMemoryManagerAllocateDataSectionCallbackI
allocate a block of memory for data
AllocateDataSection
,
LLVMMemoryManagerFinalizeMemoryCallbackI
set page permissions and flush cache. Return 0 on success, 1 on error.
FinalizeMemory
,
LLVMMemoryManagerDestroyCallbackI Destroy)

Create a simple custom MCJIT memory manager.

public static void
public static void
public static void
public static boolean
LLVMExecutionEngineGetErrMsg(long EE, PointerBuffer OutError)

Returns true on error, false on success.

public static boolean
public static boolean
public static void
public static int
LLVMGenericValueIntWidth(long GenValRef)

public static double
LLVMGenericValueToFloat(long TyRef, long GenVal)

public static long
LLVMGenericValueToInt(long GenVal, boolean IsSigned)

public static long
public static long
public static long
public static long
public static long
public static long
public static long
public static long
LLVMGetPointerToGlobal(long EE, long Global)

public static void
public static void
public static void
public static long
public static boolean
LLVMRemoveModule(long EE, long M, PointerBuffer OutMod, PointerBuffer OutError)

public static long
LLVMRunFunction(long EE, long F, PointerBuffer Args)

public static int
LLVMRunFunctionAsMain(long EE, long F, PointerBuffer ArgV, PointerBuffer EnvP)

public static void
public static void
public static int
nLLVMCreateExecutionEngineForModule(long OutEE, long M, long OutError)

public static int
nLLVMCreateInterpreterForModule(long OutInterp, long M, long OutError)

public static int
nLLVMCreateJITCompilerForModule(long OutJIT, long M, int OptLevel, long OutError)

public static int
nLLVMCreateMCJITCompilerForModule(long OutJIT, long M, long Options, long SizeOfOptions, long OutError)

Unsafe version of: CreateMCJITCompilerForModule

public static long
nLLVMCreateSimpleMCJITMemoryManager(long Opaque, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy)

Unsafe version of: CreateSimpleMCJITMemoryManager

public static int
nLLVMExecutionEngineGetErrMsg(long EE, long OutError)

Unsafe version of: ExecutionEngineGetErrMsg

public static int
nLLVMFindFunction(long EE, long Name, long OutFn)

public static long
nLLVMGetFunctionAddress(long EE, long Name)

public static long
nLLVMGetGlobalValueAddress(long EE, long Name)

public static void
nLLVMInitializeMCJITCompilerOptions(long Options, long SizeOfOptions)

public static int
nLLVMRemoveModule(long EE, long M, long OutMod, long OutError)

public static long
nLLVMRunFunction(long EE, long F, int NumArgs, long Args)

public static int
nLLVMRunFunctionAsMain(long EE, long F, int ArgC, long ArgV, long EnvP)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LLVMExecutionEngineback to summary
protected LLVMExecutionEngine()

Method Detail

LLVMAddGlobalMappingback to summary
public static void LLVMAddGlobalMapping(long EE, long Global, long Addr)
LLVMAddModuleback to summary
public static void LLVMAddModule(long EE, long M)
LLVMCreateExecutionEngineForModuleback to summary
public static boolean LLVMCreateExecutionEngineForModule(PointerBuffer OutEE, long M, PointerBuffer OutError)
Annotations
@NativeType:LLVMBool
LLVMCreateGDBRegistrationListenerback to summary
public static long LLVMCreateGDBRegistrationListener()
Annotations
@NativeType:LLVMJITEventListenerRef
LLVMCreateGenericValueOfFloatback to summary
public static long LLVMCreateGenericValueOfFloat(long Ty, double N)
Annotations
@NativeType:LLVMGenericValueRef
LLVMCreateGenericValueOfIntback to summary
public static long LLVMCreateGenericValueOfInt(long Ty, long N, boolean IsSigned)
Annotations
@NativeType:LLVMGenericValueRef
LLVMCreateGenericValueOfPointerback to summary
public static long LLVMCreateGenericValueOfPointer(long P)
Annotations
@NativeType:LLVMGenericValueRef
LLVMCreateIntelJITEventListenerback to summary
public static long LLVMCreateIntelJITEventListener()
Annotations
@NativeType:LLVMJITEventListenerRef
LLVMCreateInterpreterForModuleback to summary
public static boolean LLVMCreateInterpreterForModule(PointerBuffer OutInterp, long M, PointerBuffer OutError)
Annotations
@NativeType:LLVMBool
LLVMCreateJITCompilerForModuleback to summary
public static boolean LLVMCreateJITCompilerForModule(PointerBuffer OutJIT, long M, int OptLevel, PointerBuffer OutError)
Annotations
@NativeType:LLVMBool
LLVMCreateMCJITCompilerForModuleback to summary
public static boolean LLVMCreateMCJITCompilerForModule(PointerBuffer OutJIT, long M, LLVMMCJITCompilerOptions.Buffer Options, PointerBuffer 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);
Annotations
@NativeType:LLVMBool
LLVMCreateOProfileJITEventListenerback to summary
public static long LLVMCreateOProfileJITEventListener()
Annotations
@NativeType:LLVMJITEventListenerRef
LLVMCreatePerfJITEventListenerback to summary
public static long LLVMCreatePerfJITEventListener()
Annotations
@NativeType:LLVMJITEventListenerRef
LLVMCreateSimpleMCJITMemoryManagerback to summary
public static long LLVMCreateSimpleMCJITMemoryManager(long Opaque, LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory, LLVMMemoryManagerDestroyCallbackI 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.

Parameters
Opaque:long

an opaque client object to pass back to the callbacks

AllocateCodeSection:LLVMMemoryManagerAllocateCodeSectionCallbackI

allocate a block of memory for executable code

AllocateDataSection:LLVMMemoryManagerAllocateDataSectionCallbackI

allocate a block of memory for data

FinalizeMemory:LLVMMemoryManagerFinalizeMemoryCallbackI

set page permissions and flush cache. Return 0 on success, 1 on error.

Annotations
@NativeType:LLVMMCJITMemoryManagerRef
LLVMDisposeExecutionEngineback to summary
public static void LLVMDisposeExecutionEngine(long EE)
LLVMDisposeGenericValueback to summary
public static void LLVMDisposeGenericValue(long GenVal)
LLVMDisposeMCJITMemoryManagerback to summary
public static void LLVMDisposeMCJITMemoryManager(long MM)
LLVMExecutionEngineGetErrMsgback to summary
public static boolean LLVMExecutionEngineGetErrMsg(long EE, PointerBuffer 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.

Annotations
@NativeType:LLVMBool
Since
11
LLVMFindFunctionback to summary
public static boolean LLVMFindFunction(long EE, ByteBuffer Name, PointerBuffer OutFn)
Annotations
@NativeType:LLVMBool
LLVMFindFunctionback to summary
public static boolean LLVMFindFunction(long EE, CharSequence Name, PointerBuffer OutFn)
Annotations
@NativeType:LLVMBool
LLVMFreeMachineCodeForFunctionback to summary
public static void LLVMFreeMachineCodeForFunction(long EE, long F)
LLVMGenericValueIntWidthback to summary
public static int LLVMGenericValueIntWidth(long GenValRef)
Annotations
@NativeType:unsigned int
LLVMGenericValueToFloatback to summary
public static double LLVMGenericValueToFloat(long TyRef, long GenVal)
LLVMGenericValueToIntback to summary
public static long LLVMGenericValueToInt(long GenVal, boolean IsSigned)
Annotations
@NativeType:unsigned long long
LLVMGenericValueToPointerback to summary
public static long LLVMGenericValueToPointer(long GenVal)
Annotations
@NativeType:void *
LLVMGetExecutionEngineTargetDataback to summary
public static long LLVMGetExecutionEngineTargetData(long EE)
Annotations
@NativeType:LLVMTargetDataRef
LLVMGetExecutionEngineTargetMachineback to summary
public static long LLVMGetExecutionEngineTargetMachine(long EE)
Annotations
@NativeType:LLVMTargetMachineRef
LLVMGetFunctionAddressback to summary
public static long LLVMGetFunctionAddress(long EE, ByteBuffer Name)
Annotations
@NativeType:uint64_t
LLVMGetFunctionAddressback to summary
public static long LLVMGetFunctionAddress(long EE, CharSequence Name)
Annotations
@NativeType:uint64_t
LLVMGetGlobalValueAddressback to summary
public static long LLVMGetGlobalValueAddress(long EE, ByteBuffer Name)
Annotations
@NativeType:uint64_t
LLVMGetGlobalValueAddressback to summary
public static long LLVMGetGlobalValueAddress(long EE, CharSequence Name)
Annotations
@NativeType:uint64_t
LLVMGetPointerToGlobalback to summary
public static long LLVMGetPointerToGlobal(long EE, long Global)
Annotations
@NativeType:void *
LLVMInitializeMCJITCompilerOptionsback to summary
public static void LLVMInitializeMCJITCompilerOptions(LLVMMCJITCompilerOptions.Buffer Options)
LLVMLinkInInterpreterback to summary
public static void LLVMLinkInInterpreter()
LLVMLinkInMCJITback to summary
public static void LLVMLinkInMCJIT()
LLVMRecompileAndRelinkFunctionback to summary
public static long LLVMRecompileAndRelinkFunction(long EE, long Fn)
Annotations
@NativeType:void *
LLVMRemoveModuleback to summary
public static boolean LLVMRemoveModule(long EE, long M, PointerBuffer OutMod, PointerBuffer OutError)
Annotations
@NativeType:LLVMBool
LLVMRunFunctionback to summary
public static long LLVMRunFunction(long EE, long F, PointerBuffer Args)
Annotations
@NativeType:LLVMGenericValueRef
LLVMRunFunctionAsMainback to summary
public static int LLVMRunFunctionAsMain(long EE, long F, PointerBuffer ArgV, PointerBuffer EnvP)
LLVMRunStaticConstructorsback to summary
public static void LLVMRunStaticConstructors(long EE)
LLVMRunStaticDestructorsback to summary
public static void LLVMRunStaticDestructors(long EE)
nLLVMCreateExecutionEngineForModuleback to summary
public static int nLLVMCreateExecutionEngineForModule(long OutEE, long M, long OutError)
nLLVMCreateInterpreterForModuleback to summary
public static int nLLVMCreateInterpreterForModule(long OutInterp, long M, long OutError)
nLLVMCreateJITCompilerForModuleback to summary
public static int nLLVMCreateJITCompilerForModule(long OutJIT, long M, int OptLevel, long OutError)
nLLVMCreateMCJITCompilerForModuleback to summary
public static int nLLVMCreateMCJITCompilerForModule(long OutJIT, long M, long Options, long SizeOfOptions, long OutError)

Unsafe version of: CreateMCJITCompilerForModule

nLLVMCreateSimpleMCJITMemoryManagerback to summary
public static long nLLVMCreateSimpleMCJITMemoryManager(long Opaque, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy)

Unsafe version of: CreateSimpleMCJITMemoryManager

nLLVMExecutionEngineGetErrMsgback to summary
public static int nLLVMExecutionEngineGetErrMsg(long EE, long OutError)

Unsafe version of: ExecutionEngineGetErrMsg

nLLVMFindFunctionback to summary
public static int nLLVMFindFunction(long EE, long Name, long OutFn)
nLLVMGetFunctionAddressback to summary
public static long nLLVMGetFunctionAddress(long EE, long Name)
nLLVMGetGlobalValueAddressback to summary
public static long nLLVMGetGlobalValueAddress(long EE, long Name)
nLLVMInitializeMCJITCompilerOptionsback to summary
public static void nLLVMInitializeMCJITCompilerOptions(long Options, long SizeOfOptions)
nLLVMRemoveModuleback to summary
public static int nLLVMRemoveModule(long EE, long M, long OutMod, long OutError)
nLLVMRunFunctionback to summary
public static long nLLVMRunFunction(long EE, long F, int NumArgs, long Args)
nLLVMRunFunctionAsMainback to summary
public static int nLLVMRunFunctionAsMain(long EE, long F, int ArgC, long ArgV, long EnvP)
org.lwjgl.llvm back to summary

public final Class LLVMExecutionEngine.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from LLVMCore.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final long
AddGlobalMapping

Function address.

public static final long
AddModule

Function address.

public static final long
public static final long
public static final long
CreateGenericValueOfFloat

Function address.

public static final long
CreateGenericValueOfInt

Function address.

public static final long
CreateGenericValueOfPointer

Function address.

public static final long
CreateIntelJITEventListener

Function address.

public static final long
CreateInterpreterForModule

Function address.

public static final long
CreateJITCompilerForModule

Function address.

public static final long
public static final long
public static final long
CreatePerfJITEventListener

Function address.

public static final long
public static final long
DisposeExecutionEngine

Function address.

public static final long
DisposeGenericValue

Function address.

public static final long
DisposeMCJITMemoryManager

Function address.

public static final long
ExecutionEngineGetErrMsg

Function address.

public static final long
FindFunction

Function address.

public static final long
FreeMachineCodeForFunction

Function address.

public static final long
GenericValueIntWidth

Function address.

public static final long
GenericValueToFloat

Function address.

public static final long
GenericValueToInt

Function address.

public static final long
GenericValueToPointer

Function address.

public static final long
public static final long
public static final long
GetFunctionAddress

Function address.

public static final long
GetGlobalValueAddress

Function address.

public static final long
GetPointerToGlobal

Function address.

public static final long
public static final long
LinkInInterpreter

Function address.

public static final long
LinkInMCJIT

Function address.

public static final long
RecompileAndRelinkFunction

Function address.

public static final long
RemoveModule

Function address.

public static final long
RunFunction

Function address.

public static final long
RunFunctionAsMain

Function address.

public static final long
RunStaticConstructors

Function address.

public static final long
RunStaticDestructors

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AddGlobalMappingback to summary
public static final long AddGlobalMapping

Function address.

AddModuleback to summary
public static final long AddModule

Function address.

CreateExecutionEngineForModuleback to summary
public static final long CreateExecutionEngineForModule

Function address.

CreateGDBRegistrationListenerback to summary
public static final long CreateGDBRegistrationListener

Function address.

CreateGenericValueOfFloatback to summary
public static final long CreateGenericValueOfFloat

Function address.

CreateGenericValueOfIntback to summary
public static final long CreateGenericValueOfInt

Function address.

CreateGenericValueOfPointerback to summary
public static final long CreateGenericValueOfPointer

Function address.

CreateIntelJITEventListenerback to summary
public static final long CreateIntelJITEventListener

Function address.

CreateInterpreterForModuleback to summary
public static final long CreateInterpreterForModule

Function address.

CreateJITCompilerForModuleback to summary
public static final long CreateJITCompilerForModule

Function address.

CreateMCJITCompilerForModuleback to summary
public static final long CreateMCJITCompilerForModule

Function address.

CreateOProfileJITEventListenerback to summary
public static final long CreateOProfileJITEventListener

Function address.

CreatePerfJITEventListenerback to summary
public static final long CreatePerfJITEventListener

Function address.

CreateSimpleMCJITMemoryManagerback to summary
public static final long CreateSimpleMCJITMemoryManager

Function address.

DisposeExecutionEngineback to summary
public static final long DisposeExecutionEngine

Function address.

DisposeGenericValueback to summary
public static final long DisposeGenericValue

Function address.

DisposeMCJITMemoryManagerback to summary
public static final long DisposeMCJITMemoryManager

Function address.

ExecutionEngineGetErrMsgback to summary
public static final long ExecutionEngineGetErrMsg

Function address.

FindFunctionback to summary
public static final long FindFunction

Function address.

FreeMachineCodeForFunctionback to summary
public static final long FreeMachineCodeForFunction

Function address.

GenericValueIntWidthback to summary
public static final long GenericValueIntWidth

Function address.

GenericValueToFloatback to summary
public static final long GenericValueToFloat

Function address.

GenericValueToIntback to summary
public static final long GenericValueToInt

Function address.

GenericValueToPointerback to summary
public static final long GenericValueToPointer

Function address.

GetExecutionEngineTargetDataback to summary
public static final long GetExecutionEngineTargetData

Function address.

GetExecutionEngineTargetMachineback to summary
public static final long GetExecutionEngineTargetMachine

Function address.

GetFunctionAddressback to summary
public static final long GetFunctionAddress

Function address.

GetGlobalValueAddressback to summary
public static final long GetGlobalValueAddress

Function address.

GetPointerToGlobalback to summary
public static final long GetPointerToGlobal

Function address.

InitializeMCJITCompilerOptionsback to summary
public static final long InitializeMCJITCompilerOptions

Function address.

LinkInInterpreterback to summary
public static final long LinkInInterpreter

Function address.

LinkInMCJITback to summary
public static final long LinkInMCJIT

Function address.

RecompileAndRelinkFunctionback to summary
public static final long RecompileAndRelinkFunction

Function address.

RemoveModuleback to summary
public static final long RemoveModule

Function address.

RunFunctionback to summary
public static final long RunFunction

Function address.

RunFunctionAsMainback to summary
public static final long RunFunctionAsMain

Function address.

RunStaticConstructorsback to summary
public static final long RunStaticConstructors

Function address.

RunStaticDestructorsback to summary
public static final long RunStaticDestructors

Function address.

Constructor Detail

Functionsback to summary
private Functions()