Class LLVMLLJIT
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded fromLLVMCore.getLibrary(). -
Method Summary
Modifier and TypeMethodDescriptionstatic longLLVMOrcCreateLLJIT(org.lwjgl.PointerBuffer Result, long Builder) Create anLLJITinstance from anLLJITBuilder.static longCreate anLLVMOrcLLJITBuilder.static longLLVMOrcDisposeLLJIT(long J) Dispose of an LLJIT instance.static voidLLVMOrcDisposeLLJITBuilder(long Builder) Dispose of anLLVMOrcLLJITBuilderRef.static longLLVMOrcLLJITAddLLVMIRModule(long J, long JD, long TSM) Add an IR module to the givenJITDylibin the givenLLJITinstance.static longLLVMOrcLLJITAddLLVMIRModuleWithRT(long J, long JD, long TSM) Add an IR module to the givenResourceTracker'sJITDylibin the givenLLJITinstance.static longLLVMOrcLLJITAddObjectFile(long J, long JD, long ObjBuffer) Add a buffer representing an object file to the givenJITDylibin the givenLLJITinstance.static longLLVMOrcLLJITAddObjectFileWithRT(long J, long RT, long ObjBuffer) Add a buffer representing an object file to the givenResourceTracker'sJITDylibin the givenLLJITinstance.static voidLLVMOrcLLJITBuilderSetJITTargetMachineBuilder(long Builder, long JTMB) Set theJITTargetMachineBuilderto be used when constructing theLLJITinstance.static voidLLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(long Builder, LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunctionI F, long Ctx) Set anObjectLinkingLayercreator function for thisLLJITinstance.static @Nullable StringLLVMOrcLLJITGetDataLayoutStr(long J) Get theLLJITinstance's default data layout string.static longLLVMOrcLLJITGetExecutionSession(long J) Get a reference to theExecutionSessionfor thisLLJITinstance.static byteLLVMOrcLLJITGetGlobalPrefix(long J) Returns the global prefix character according to theLLJIT'sDataLayout.static longLLVMOrcLLJITGetIRTransformLayer(long J) Returns a non-owning reference to theLLJITinstance's IR transform layer.static longLLVMOrcLLJITGetMainJITDylib(long J) Return a reference to the MainJITDylib.static longLLVMOrcLLJITGetObjLinkingLayer(long J) Returns a non-owning reference to theLLJITinstance's object linking layer.static longLLVMOrcLLJITGetObjTransformLayer(long J) Returns a non-owning reference to theLLJITinstance's object linking layer.static @Nullable StringLLVMOrcLLJITGetTripleString(long J) Return the target triple for thisLLJITinstance.static longLLVMOrcLLJITLookup(long J, LongBuffer Result, CharSequence Name) Look up the given symbol in the mainJITDylibof the givenLLJITinstance.static longLLVMOrcLLJITLookup(long J, LongBuffer Result, ByteBuffer Name) Look up the given symbol in the mainJITDylibof the givenLLJITinstance.static longLLVMOrcLLJITMangleAndIntern(long J, CharSequence UnmangledName) Mangles the given string according to theLLJITinstance'sDataLayout, then interns the result in theSymbolStringPooland returns a reference to the pool entry.static longLLVMOrcLLJITMangleAndIntern(long J, ByteBuffer UnmangledName) Mangles the given string according to theLLJITinstance'sDataLayout, then interns the result in theSymbolStringPooland returns a reference to the pool entry.static longnLLVMOrcCreateLLJIT(long Result, long Builder) Unsafe version of:OrcCreateLLJITstatic voidnLLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(long Builder, long F, long Ctx) Unsafe version of:OrcLLJITBuilderSetObjectLinkingLayerCreatorstatic longnLLVMOrcLLJITGetDataLayoutStr(long J) Unsafe version of:OrcLLJITGetDataLayoutStrstatic longnLLVMOrcLLJITGetTripleString(long J) Unsafe version of:OrcLLJITGetTripleStringstatic longnLLVMOrcLLJITLookup(long J, long Result, long Name) Unsafe version of:OrcLLJITLookupstatic longnLLVMOrcLLJITMangleAndIntern(long J, long UnmangledName) Unsafe version of:OrcLLJITMangleAndIntern
-
Method Details
-
LLVMOrcCreateLLJITBuilder
public static long LLVMOrcCreateLLJITBuilder()Create anLLVMOrcLLJITBuilder.The client owns the resulting
LLJITBuilderand should dispose of it usingOrcDisposeLLJITBuilderonce they are done with it. -
LLVMOrcDisposeLLJITBuilder
public static void LLVMOrcDisposeLLJITBuilder(long Builder) Dispose of anLLVMOrcLLJITBuilderRef.This should only be called if ownership has not been passed to
LLVMOrcCreateLLJIT(e.g. because some error prevented that function from being called). -
LLVMOrcLLJITBuilderSetJITTargetMachineBuilder
public static void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(long Builder, long JTMB) Set theJITTargetMachineBuilderto be used when constructing theLLJITinstance.Calling this function is optional: if it is not called then the
LLJITBuilderwill useJITTargeTMachineBuilder::detectHostto construct aJITTargetMachineBuilder.This function takes ownership of the
JTMBargument: clients should not dispose of theJITTargetMachineBuilderafter calling this function. -
nLLVMOrcLLJITBuilderSetObjectLinkingLayerCreator
public static void nLLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(long Builder, long F, long Ctx) Unsafe version of:OrcLLJITBuilderSetObjectLinkingLayerCreator -
LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator
public static void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(long Builder, LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunctionI F, long Ctx) Set anObjectLinkingLayercreator function for thisLLJITinstance.- Since:
- 12
-
nLLVMOrcCreateLLJIT
public static long nLLVMOrcCreateLLJIT(long Result, long Builder) Unsafe version of:OrcCreateLLJIT -
LLVMOrcCreateLLJIT
public static long LLVMOrcCreateLLJIT(org.lwjgl.PointerBuffer Result, long Builder) Create anLLJITinstance from anLLJITBuilder.This operation takes ownership of the
Builderargument: clients should not dispose of the builder after calling this function (even if the function returns an error). If a nullBuilderargument is provided then a default-constructedLLJITBuilderwill be used.On success the resulting
LLJITinstance is uniquely owned by the client and automatically manages the memory of all JIT'd code and all modules that are transferred to it (e.g. viaOrcLLJITAddLLVMIRModule). Disposing of theLLJITinstance will free all memory managed by the JIT, including JIT'd code and not-yet compiled modules. -
LLVMOrcDisposeLLJIT
public static long LLVMOrcDisposeLLJIT(long J) Dispose of an LLJIT instance. -
LLVMOrcLLJITGetExecutionSession
public static long LLVMOrcLLJITGetExecutionSession(long J) Get a reference to theExecutionSessionfor thisLLJITinstance.The
ExecutionSessionis owned by theLLJITinstance. The client is not responsible for managing its memory. -
LLVMOrcLLJITGetMainJITDylib
public static long LLVMOrcLLJITGetMainJITDylib(long J) Return a reference to the MainJITDylib.The
JITDylibis owned by theLLJITinstance. The client is not responsible for managing its memory. -
nLLVMOrcLLJITGetTripleString
public static long nLLVMOrcLLJITGetTripleString(long J) Unsafe version of:OrcLLJITGetTripleString -
LLVMOrcLLJITGetTripleString
Return the target triple for thisLLJITinstance. This string is owned by theLLJITinstance and should not be freed by the client. -
LLVMOrcLLJITGetGlobalPrefix
public static byte LLVMOrcLLJITGetGlobalPrefix(long J) Returns the global prefix character according to theLLJIT'sDataLayout. -
nLLVMOrcLLJITMangleAndIntern
public static long nLLVMOrcLLJITMangleAndIntern(long J, long UnmangledName) Unsafe version of:OrcLLJITMangleAndIntern -
LLVMOrcLLJITMangleAndIntern
Mangles the given string according to theLLJITinstance'sDataLayout, then interns the result in theSymbolStringPooland returns a reference to the pool entry.Clients should call
OrcReleaseSymbolStringPoolEntryto decrement the ref-count on the pool entry once they are finished with this value. -
LLVMOrcLLJITMangleAndIntern
Mangles the given string according to theLLJITinstance'sDataLayout, then interns the result in theSymbolStringPooland returns a reference to the pool entry.Clients should call
OrcReleaseSymbolStringPoolEntryto decrement the ref-count on the pool entry once they are finished with this value. -
LLVMOrcLLJITAddObjectFile
public static long LLVMOrcLLJITAddObjectFile(long J, long JD, long ObjBuffer) Add a buffer representing an object file to the givenJITDylibin the givenLLJITinstance. This operation transfers ownership of the buffer to theLLJITinstance. The buffer should not be disposed of or referenced once this function returns.Resources associated with the given object will be tracked by the given
JITDylib's default resource tracker. -
LLVMOrcLLJITAddObjectFileWithRT
public static long LLVMOrcLLJITAddObjectFileWithRT(long J, long RT, long ObjBuffer) Add a buffer representing an object file to the givenResourceTracker'sJITDylibin the givenLLJITinstance. This operation transfers ownership of the buffer to theLLJITinstance. The buffer should not be disposed of or referenced once this function returns.Resources associated with the given object will be tracked by
ResourceTrackerRT.- Since:
- 12
-
LLVMOrcLLJITAddLLVMIRModule
public static long LLVMOrcLLJITAddLLVMIRModule(long J, long JD, long TSM) Add an IR module to the givenJITDylibin the givenLLJITinstance. This operation transfers ownership of theTSMargument to theLLJITinstance. TheTSMargument should not be disposed of or referenced once this function returns.Resources associated with the given
Modulewill be tracked by the givenJITDylib's default resource tracker. -
LLVMOrcLLJITAddLLVMIRModuleWithRT
public static long LLVMOrcLLJITAddLLVMIRModuleWithRT(long J, long JD, long TSM) Add an IR module to the givenResourceTracker'sJITDylibin the givenLLJITinstance. This operation transfers ownership of theTSMargument to theLLJITinstance. TheTSMargument should not be disposed of or referenced once this function returns.Resources associated with the given
Modulewill be tracked byResourceTrackerRT.- Since:
- 12
-
nLLVMOrcLLJITLookup
public static long nLLVMOrcLLJITLookup(long J, long Result, long Name) Unsafe version of:OrcLLJITLookup -
LLVMOrcLLJITLookup
Look up the given symbol in the mainJITDylibof the givenLLJITinstance.This operation does not take ownership of the Name argument.
-
LLVMOrcLLJITLookup
Look up the given symbol in the mainJITDylibof the givenLLJITinstance.This operation does not take ownership of the Name argument.
-
LLVMOrcLLJITGetObjLinkingLayer
public static long LLVMOrcLLJITGetObjLinkingLayer(long J) Returns a non-owning reference to theLLJITinstance's object linking layer.- Since:
- 12
-
LLVMOrcLLJITGetObjTransformLayer
public static long LLVMOrcLLJITGetObjTransformLayer(long J) Returns a non-owning reference to theLLJITinstance's object linking layer.- Since:
- 12
-
LLVMOrcLLJITGetIRTransformLayer
public static long LLVMOrcLLJITGetIRTransformLayer(long J) Returns a non-owning reference to theLLJITinstance's IR transform layer.- Since:
- 12
-
nLLVMOrcLLJITGetDataLayoutStr
public static long nLLVMOrcLLJITGetDataLayoutStr(long J) Unsafe version of:OrcLLJITGetDataLayoutStr -
LLVMOrcLLJITGetDataLayoutStr
Get theLLJITinstance's default data layout string.This string is owned by the
LLJITinstance and does not need to be freed by the caller.- Since:
- 12
-