rocm.bindings.llvm.c.lljit#
2026-09-24
12 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
A function for constructing an ObjectLinkingLayer instance to be used |
|
(No short description) |
|
(No short description) |
Functions#
|
|
Create an LLVMOrcLLJITBuilder. |
|
|
Dispose of an LLVMOrcLLJITBuilderRef. |
|
Set the JITTargetMachineBuilder to be used when constructing the LLJIT |
Set an ObjectLinkingLayer creator function for this LLJIT instance. |
|
|
Create an LLJIT instance from an LLJITBuilder. |
Dispose of an LLJIT instance. |
|
Get a reference to the ExecutionSession for this LLJIT instance. |
|
Return a reference to the Main JITDylib. |
|
Return the target triple for this LLJIT instance. |
|
Returns the global prefix character according to the LLJIT's DataLayout. |
|
|
Mangles the given string according to the LLJIT instance's DataLayout, then |
|
Add a buffer representing an object file to the given JITDylib in the given |
|
Add a buffer representing an object file to the given ResourceTracker's |
|
Add an IR module to the given JITDylib in the given LLJIT instance. |
|
Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT |
|
Look up the given symbol in the main JITDylib of the given LLJIT instance. |
Returns a non-owning reference to the LLJIT instance's object linking layer. |
|
Returns a non-owning reference to the LLJIT instance's object linking layer. |
|
Returns a non-owning reference to the LLJIT instance's IR transform layer. |
|
Get the LLJIT instance's default data layout string. |
Module Contents#
- class rocm.bindings.llvm.c.lljit.LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA function for constructing an ObjectLinkingLayer instance to be used by an LLJIT instance.
Clients can call LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator to set the creator function to use when constructing an LLJIT instance. This can be used to override the default linking layer implementation that would otherwise be chosen by LLJITBuilder.
Object linking layers returned by this function will become owned by the LLJIT instance. The client is not responsible for managing their lifetimes after the function returns.
- FIXME: This method needs to be updated to take a JITLinkMemoryManager
argument.
- class rocm.bindings.llvm.c.lljit.LLVMOrcOpaqueLLJITBuilder(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITBuilderRef#
- class rocm.bindings.llvm.c.lljit.LLVMOrcOpaqueLLJIT(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITRef#
- rocm.bindings.llvm.c.lljit.LLVMOrcCreateLLJITBuilder()#
Create an LLVMOrcLLJITBuilder.
The client owns the resulting LLJITBuilder and should dispose of it using LLVMOrcDisposeLLJITBuilder once they are done with it.
- Returns:
None: (undocumented)
C signature
LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder()
- rocm.bindings.llvm.c.lljit.LLVMOrcDisposeLLJITBuilder(Builder)#
Dispose of an LLVMOrcLLJITBuilderRef.
This should only be called if ownership has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented that function from being called).
- Args:
- Builder (
LLVMOrcOpaqueLLJITBuilder/object): (undocumented)
- Builder (
C signature
void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(Builder, JTMB)#
Set the JITTargetMachineBuilder to be used when constructing the LLJIT instance.
Calling this function is optional: if it is not called then the LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a JITTargetMachineBuilder.
This function takes ownership of the JTMB argument: clients should not dispose of the JITTargetMachineBuilder after calling this function.
- Args:
- Builder (
LLVMOrcOpaqueLLJITBuilder/object): (undocumented)
- JTMB (
Pointer/object): (undocumented)
- Builder (
C signature
void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(Builder, F, Ctx)#
Set an ObjectLinkingLayer creator function for this LLJIT instance.
- Args:
- Builder (
LLVMOrcOpaqueLLJITBuilder/object): (undocumented)
- F (
LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- Builder (
C signature
void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(LLVMOrcLLJITBuilderRef Builder, LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction F, void * Ctx)
- rocm.bindings.llvm.c.lljit.LLVMOrcCreateLLJIT(Result, Builder)#
Create an LLJIT instance from an LLJITBuilder.
This operation takes ownership of the Builder argument: clients should not dispose of the builder after calling this function (even if the function returns an error). If a null Builder argument is provided then a default-constructed LLJITBuilder will be used.
On success the resulting LLJIT instance 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. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the LLJIT instance will free all memory managed by the JIT, including JIT’d code and not-yet compiled modules.
- Args:
- Result (
Pointer/object): (undocumented)
- Builder (
LLVMOrcOpaqueLLJITBuilder/object): (undocumented)
- Result (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcCreateLLJIT(LLVMOrcLLJITRef * Result, LLVMOrcLLJITBuilderRef Builder)
- rocm.bindings.llvm.c.lljit.LLVMOrcDisposeLLJIT(J)#
Dispose of an LLJIT instance.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcDisposeLLJIT(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetExecutionSession(J)#
Get a reference to the ExecutionSession for this LLJIT instance.
The ExecutionSession is owned by the LLJIT instance. The client is not responsible for managing its memory.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetMainJITDylib(J)#
Return a reference to the Main JITDylib.
The JITDylib is owned by the LLJIT instance. The client is not responsible for managing its memory.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetTripleString(J)#
Return the target triple for this LLJIT instance.
This string is owned by the LLJIT instance and should not be freed by the client.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMOrcLLJITGetTripleString(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetGlobalPrefix(J)#
Returns the global prefix character according to the LLJIT’s DataLayout.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
int: (undocumented)
C signature
char LLVMOrcLLJITGetGlobalPrefix(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITMangleAndIntern(J, UnmangledName)#
Mangles the given string according to the LLJIT instance’s DataLayout, then interns the result in the SymbolStringPool and returns a reference to the pool entry.
Clients should call LLVMOrcReleaseSymbolStringPoolEntry to decrement the ref-count on the pool entry once they are finished with this value.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- UnmangledName (
CStr/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcSymbolStringPoolEntryRef LLVMOrcLLJITMangleAndIntern(LLVMOrcLLJITRef J, const char * UnmangledName)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITAddObjectFile(J, JD, ObjBuffer)#
Add a buffer representing an object file to the given JITDylib in the given LLJIT instance.
This operation transfers ownership of the buffer to the LLJIT instance. 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.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcLLJITAddObjectFile(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITAddObjectFileWithRT(J, RT, ObjBuffer)#
Add a buffer representing an object file to the given ResourceTracker’s JITDylib in the given LLJIT instance.
This operation transfers ownership of the buffer to the LLJIT instance. The buffer should not be disposed of or referenced once this function returns.
Resources associated with the given object will be tracked by ResourceTracker RT.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT(LLVMOrcLLJITRef J, LLVMOrcResourceTrackerRef RT, LLVMMemoryBufferRef ObjBuffer)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITAddLLVMIRModule(J, JD, TSM)#
Add an IR module to the given JITDylib in the given LLJIT instance.
This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.
Resources associated with the given Module will be tracked by the given JITDylib’s default resource tracker.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMOrcThreadSafeModuleRef TSM)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITAddLLVMIRModuleWithRT(J, JD, TSM)#
Add an IR module to the given ResourceTracker’s JITDylib in the given LLJIT instance.
This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.
Resources associated with the given Module will be tracked by ResourceTracker RT.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT(LLVMOrcLLJITRef J, LLVMOrcResourceTrackerRef JD, LLVMOrcThreadSafeModuleRef TSM)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITLookup(J, Result, Name)#
Look up the given symbol in the main JITDylib of the given LLJIT instance.
This operation does not take ownership of the Name argument.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- Result (
PointerToUInt64/object): (undocumented)
- Name (
CStr/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcLLJITLookup(LLVMOrcLLJITRef J, LLVMOrcExecutorAddress * Result, const char * Name)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetObjLinkingLayer(J)#
Returns a non-owning reference to the LLJIT instance’s object linking layer.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcObjectLayerRef LLVMOrcLLJITGetObjLinkingLayer(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetObjTransformLayer(J)#
Returns a non-owning reference to the LLJIT instance’s object linking layer.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcObjectTransformLayerRef LLVMOrcLLJITGetObjTransformLayer(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetIRTransformLayer(J)#
Returns a non-owning reference to the LLJIT instance’s IR transform layer.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
None: (undocumented)
C signature
LLVMOrcIRTransformLayerRef LLVMOrcLLJITGetIRTransformLayer(LLVMOrcLLJITRef J)
- rocm.bindings.llvm.c.lljit.LLVMOrcLLJITGetDataLayoutStr(J)#
Get the LLJIT instance’s default data layout string.
This string is owned by the LLJIT instance and does not need to be freed by the caller.
- Args:
- J (
LLVMOrcOpaqueLLJIT/object): (undocumented)
- J (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMOrcLLJITGetDataLayoutStr(LLVMOrcLLJITRef J)