rocm.bindings.llvm.c.orc#
2026-09-24
46 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
Represents generic linkage flags for a symbol definition. |
|
Represents the linkage flags for a symbol definition. |
|
Represents an evaluated symbol address and flags. |
|
(No short description) |
|
Error reporter function. |
|
(No short description) |
|
(No short description) |
|
Represents a pair of a symbol name and LLVMJITSymbolFlags. |
|
Represents a pair of a symbol name and an evaluated symbol. |
|
Represents a SymbolAliasMapEntry |
|
Represents a pair of a symbol name and SymbolAliasMapEntry. |
|
(No short description) |
|
Represents a list of LLVMOrcSymbolStringPoolEntryRef and the associated |
|
Represents a pair of a JITDylib and LLVMOrcCSymbolsList. |
|
A set of symbols that share dependencies. |
|
Lookup kind. |
|
JITDylib lookup flags. |
|
An element type for a JITDylib search order. |
|
Symbol lookup flags for lookup sets. |
|
An element type for a symbol lookup set. |
|
(No short description) |
|
(No short description) |
|
A MaterializationUnit materialize callback. |
|
A MaterializationUnit discard callback. |
|
A MaterializationUnit destruction callback. |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
A custom generator function. |
|
Disposer for a custom generator. |
|
Predicate function for SymbolStringPoolEntries. |
|
(No short description) |
|
(No short description) |
|
A function for inspecting/mutating IR modules, suitable for use with |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
A function for applying transformations as part of an transform layer. |
|
(No short description) |
|
A function for applying transformations to an object file buffer. |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
Callback type for ExecutionSession lookups. |
Functions#
|
|
Attach a custom error reporter function to the ExecutionSession. |
|
Return a reference to the SymbolStringPool for an ExecutionSession. |
|
Clear all unreferenced symbol string pool entries. |
|
|
Intern a string in the ExecutionSession's SymbolStringPool and return a |
|
Look up symbols in an execution session. |
Increments the ref-count for a SymbolStringPool entry. |
|
Reduces the ref-count for of a SymbolStringPool entry. |
|
Return the c-string for the given symbol. |
|
Reduces the ref-count of a ResourceTracker. |
|
|
Transfers tracking of all resources associated with resource tracker SrcRT |
Remove all resources associated with the given tracker. |
|
Dispose of a JITDylib::DefinitionGenerator. |
|
Dispose of a MaterializationUnit. |
|
|
Create a custom MaterializationUnit. |
|
Create a MaterializationUnit to define the given symbols as pointing to |
|
Create a MaterializationUnit to define lazy re-expots. |
Disposes of the passed MaterializationResponsibility object. |
|
Returns the target JITDylib that these symbols are being materialized into. |
|
Returns the ExecutionSession for this MaterializationResponsibility. |
|
Returns the symbol flags map for this responsibility instance. |
|
Disposes of the passed LLVMOrcCSymbolFlagsMap. |
|
|
Returns the initialization pseudo-symbol, if any. |
|
Returns the names of any symbols covered by this |
|
Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* . |
Notifies the target JITDylib that the given symbols have been resolved. |
|
Notifies the target JITDylib (and any pending queries on that JITDylib) |
|
|
Attempt to claim responsibility for new definitions. |
Notify all not-yet-emitted covered by this MaterializationResponsibility |
|
Transfers responsibility to the given MaterializationUnit for all |
|
Delegates responsibility for the given symbols to the returned |
|
Create a "bare" JITDylib. |
|
|
Create a JITDylib. |
|
Returns the JITDylib with the given name, or NULL if no such JITDylib |
Return a reference to a newly created resource tracker associated with JD. |
|
Return a reference to the default resource tracker for the given JITDylib. |
|
|
Add the given MaterializationUnit to the given JITDylib. |
Calls remove on all trackers associated with this JITDylib, see |
|
|
Add a DefinitionGenerator to the given JITDylib. |
|
Create a custom generator. |
|
Continue a lookup that was suspended in a generator (see |
Get a DynamicLibrarySearchGenerator that will reflect process symbols into |
|
Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect |
|
Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect |
|
Create a ThreadSafeContextRef containing a new LLVMContext. |
|
Create a ThreadSafeContextRef from a given LLVMContext, which must not be |
|
Dispose of a ThreadSafeContext. |
|
|
Create a ThreadSafeModule wrapper around the given LLVM module. |
Dispose of a ThreadSafeModule. |
|
|
Apply the given function to the module contained in this ThreadSafeModule. |
Create a JITTargetMachineBuilder by detecting the host. |
|
Create a JITTargetMachineBuilder from the given TargetMachine template. |
|
Dispose of a JITTargetMachineBuilder. |
|
Returns the target triple for the given JITTargetMachineBuilder as a string. |
|
Sets the target triple for the given JITTargetMachineBuilder to the given |
|
|
Add an object to an ObjectLayer to the given JITDylib. |
|
Add an object to an ObjectLayer using the given ResourceTracker. |
|
Emit an object buffer to an ObjectLayer. |
|
Dispose of an ObjectLayer. |
|
Dispose of an ObjectLayer. |
|
Set the transform function of the provided transform layer, passing through a |
Set the transform function on an LLVMOrcObjectTransformLayer. |
|
|
Create a LocalIndirectStubsManager from the given target triple. |
Dispose of an IndirectStubsManager. |
|
|
Dispose of an IndirectStubsManager. |
Dispose of an LazyCallThroughManager. |
|
|
Create a DumpObjects instance. |
|
Dispose of a DumpObjects instance. |
|
Dump the contents of the given MemoryBuffer. |
Module Contents#
- class rocm.bindings.llvm.c.orc.LLVMJITSymbolGenericFlags#
Bases:
enum.IntEnumRepresents generic linkage flags for a symbol definition.
- class rocm.bindings.llvm.c.orc.LLVMJITSymbolFlags(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents the linkage flags for a symbol definition.
- GenericFlags: Any#
- TargetFlags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.llvm.c.orc.LLVMJITEvaluatedSymbol(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents an evaluated symbol address and flags.
- Address: Any#
- Flags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueExecutionSession(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcErrorReporterFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerError reporter function.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueSymbolStringPool(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcSymbolStringPoolRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueSymbolStringPoolEntry(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcSymbolStringPoolEntryRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolFlagsMapPair(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a pair of a symbol name and LLVMJITSymbolFlags.
- Name: Any#
- Flags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCSymbolFlagsMapPairs#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolMapPair(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a pair of a symbol name and an evaluated symbol.
- Name: Any#
- Sym: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCSymbolMapPairs#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolAliasMapEntry(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a SymbolAliasMapEntry
- Name: Any#
- Flags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolAliasMapPair(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a pair of a symbol name and SymbolAliasMapEntry.
- Name: Any#
- Entry: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCSymbolAliasMapPairs#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueJITDylib(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolsList(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a list of LLVMOrcSymbolStringPoolEntryRef and the associated length.
- Symbols: Any#
- Length: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.llvm.c.orc.LLVMOrcCDependenceMapPair(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRepresents a pair of a JITDylib and LLVMOrcCSymbolsList.
- JD: Any#
- Names: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCDependenceMapPairs#
- class rocm.bindings.llvm.c.orc.LLVMOrcCSymbolDependenceGroup(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA set of symbols that share dependencies.
- Symbols: Any#
- Dependencies: Any#
- NumDependencies: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.llvm.c.orc.LLVMOrcLookupKind#
Bases:
enum.IntEnumLookup kind.
This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with llvm::orc::LookupKind.
- class rocm.bindings.llvm.c.orc.LLVMOrcJITDylibLookupFlags#
Bases:
enum.IntEnumJITDylib lookup flags.
This can be used by definition generators when deciding whether to produce a definition for a requested symbol.
This enum should be kept in sync with llvm::orc::JITDylibLookupFlags.
- class rocm.bindings.llvm.c.orc.LLVMOrcCJITDylibSearchOrderElement(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAn element type for a JITDylib search order.
- JD: Any#
- JDLookupFlags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCJITDylibSearchOrder#
- class rocm.bindings.llvm.c.orc.LLVMOrcSymbolLookupFlags#
Bases:
enum.IntEnumSymbol lookup flags for lookup sets.
This should be kept in sync with llvm::orc::SymbolLookupFlags.
- class rocm.bindings.llvm.c.orc.LLVMOrcCLookupSetElement(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAn element type for a symbol lookup set.
- Name: Any#
- LookupFlags: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- rocm.bindings.llvm.c.orc.LLVMOrcCLookupSet#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueMaterializationUnit(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationUnitRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueMaterializationResponsibility(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcMaterializationUnitMaterializeFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA MaterializationUnit materialize callback.
Ownership of the Ctx and MR arguments passes to the callback which must adhere to the LLVMOrcMaterializationResponsibilityRef contract (see comment for that type).
If this callback is called then the LLVMOrcMaterializationUnitDestroy callback will NOT be called.
- class rocm.bindings.llvm.c.orc.LLVMOrcMaterializationUnitDiscardFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA MaterializationUnit discard callback.
Ownership of JD and Symbol remain with the caller: These arguments should not be disposed of or released.
- class rocm.bindings.llvm.c.orc.LLVMOrcMaterializationUnitDestroyFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA MaterializationUnit destruction callback.
If a custom MaterializationUnit is destroyed before its Materialize function is called then this function will be called to provide an opportunity for the underlying program representation to be destroyed.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueResourceTracker(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcResourceTrackerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueDefinitionGenerator(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcDefinitionGeneratorRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueLookupState(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcLookupStateRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA custom generator function.
This can be used to create a custom generator object using LLVMOrcCreateCustomCAPIDefinitionGenerator. The resulting object can be attached to a JITDylib, via LLVMOrcJITDylibAddGenerator, to receive callbacks when lookups fail to match existing definitions.
GeneratorObj will contain the address of the custom generator object.
Ctx will contain the context object passed to LLVMOrcCreateCustomCAPIDefinitionGenerator.
LookupState will contain a pointer to an LLVMOrcLookupStateRef object. This can optionally be modified to make the definition generation process asynchronous: If the LookupStateRef value is copied, and the original LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the asynchronous definition process has been completed clients must call LLVMOrcLookupStateContinueLookup to continue the lookup (this should be done unconditionally, even if errors have occurred in the mean time, to free the lookup state memory and notify the query object of the failures). If LookupState is captured this function must return LLVMErrorSuccess.
The Kind argument can be inspected to determine the lookup kind (e.g. as-if-during-static-link, or as-if-during-dlsym).
The JD argument specifies which JITDylib the definitions should be generated into.
The JDLookupFlags argument can be inspected to determine whether the original lookup included non-exported symbols.
Finally, the LookupSet argument contains the set of symbols that could not be found in JD already (the set of generation candidates).
- class rocm.bindings.llvm.c.orc.LLVMOrcDisposeCAPIDefinitionGeneratorFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDisposer for a custom generator.
Will be called by ORC when the JITDylib that the generator is attached to is destroyed.
- class rocm.bindings.llvm.c.orc.LLVMOrcSymbolPredicate(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerPredicate function for SymbolStringPoolEntries.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueThreadSafeContext(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcThreadSafeContextRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueThreadSafeModule(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcThreadSafeModuleRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcGenericIRModuleOperationFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA function for inspecting/mutating IR modules, suitable for use with LLVMOrcThreadSafeModuleWithModuleDo.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueJITTargetMachineBuilder(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcJITTargetMachineBuilderRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueObjectLayer(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectLayerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueObjectLinkingLayer(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectLinkingLayerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueIRTransformLayer(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcIRTransformLayerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcIRTransformLayerTransformFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA function for applying transformations as part of an transform layer.
Implementations of this type are responsible for managing the lifetime of the Module pointed to by ModInOut: If the LLVMModuleRef value is overwritten then the function is responsible for disposing of the incoming module. If the module is simply accessed/mutated in-place then ownership returns to the caller and the function does not need to do any lifetime management.
Clients can call LLVMOrcLLJITGetIRTransformLayer to obtain the transform layer of a LLJIT instance, and use LLVMOrcIRTransformLayerSetTransform to set the function. This can be used to override the default transform layer.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueObjectTransformLayer(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectTransformLayerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcObjectTransformLayerTransformFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerA function for applying transformations to an object file buffer.
Implementations of this type are responsible for managing the lifetime of the memory buffer pointed to by ObjInOut: If the LLVMMemoryBufferRef value is overwritten then the function is responsible for disposing of the incoming buffer. If the buffer is simply accessed/mutated in-place then ownership returns to the caller and the function does not need to do any lifetime management.
The transform is allowed to return an error, in which case the ObjInOut buffer should be disposed of and set to null.
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueIndirectStubsManager(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcIndirectStubsManagerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueLazyCallThroughManager(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcLazyCallThroughManagerRef#
- class rocm.bindings.llvm.c.orc.LLVMOrcOpaqueDumpObjects(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.orc.LLVMOrcDumpObjectsRef#
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionSetErrorReporter(ES, ReportError, Ctx)#
Attach a custom error reporter function to the ExecutionSession.
The error reporter will be called to deliver failure notices that can not be directly reported to a caller. For example, failure to resolve symbols in the JIT linker is typically reported via the error reporter (callers requesting definitions from the JIT will typically be delivered a FailureToMaterialize error instead).
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- ReportError (
LLVMOrcErrorReporterFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- ES (
C signature
void LLVMOrcExecutionSessionSetErrorReporter(LLVMOrcExecutionSessionRef ES, LLVMOrcErrorReporterFunction ReportError, void * Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionGetSymbolStringPool(ES)#
Return a reference to the SymbolStringPool for an ExecutionSession.
Ownership of the pool remains with the ExecutionSession: The caller is not required to free the pool.
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- ES (
- Returns:
None: (undocumented)
C signature
LLVMOrcSymbolStringPoolRef LLVMOrcExecutionSessionGetSymbolStringPool(LLVMOrcExecutionSessionRef ES)
- rocm.bindings.llvm.c.orc.LLVMOrcSymbolStringPoolClearDeadEntries(SSP)#
Clear all unreferenced symbol string pool entries.
This can be called at any time to release unused entries in the ExecutionSession’s string pool. Since it locks the pool (preventing interning of any new strings) it is recommended that it only be called infrequently, ideally when the caller has reason to believe that some entries will have become unreferenced, e.g. after removing a module or closing a JITDylib.
- Args:
- SSP (
LLVMOrcOpaqueSymbolStringPool/object): (undocumented)
- SSP (
C signature
void LLVMOrcSymbolStringPoolClearDeadEntries(LLVMOrcSymbolStringPoolRef SSP)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionIntern(ES, Name)#
Intern a string in the ExecutionSession’s SymbolStringPool and return a reference to it.
This increments the ref-count of the pool entry, and the returned value should be released once the client is done with it by calling LLVMOrcReleaseSymbolStringPoolEntry.
Since strings are uniqued within the SymbolStringPool LLVMOrcSymbolStringPoolEntryRefs can be compared by value to test string equality.
Note that this function does not perform linker-mangling on the string.
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- Name (
CStr/object): (undocumented)
- ES (
- Returns:
None: (undocumented)
C signature
LLVMOrcSymbolStringPoolEntryRef LLVMOrcExecutionSessionIntern(LLVMOrcExecutionSessionRef ES, const char * Name)
- class rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionLookupHandleResultFunction(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerCallback type for ExecutionSession lookups.
If Err is LLVMErrorSuccess then Result will contain a pointer to a list of ( SymbolStringPtr, JITEvaluatedSymbol ) pairs of length NumPairs.
If Err is a failure value then Result and Ctx are undefined and should not be accessed. The Callback is responsible for handling the error value (e.g. by calling LLVMGetErrorMessage + LLVMDisposeErrorMessage).
The caller retains ownership of the Result array and will release all contained symbol names. Clients are responsible for retaining any symbol names that they wish to hold after the function returns.
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionLookup(ES, K, SearchOrder, SearchOrderSize, Symbols, SymbolsSize, HandleResult, Ctx)#
Look up symbols in an execution session.
This is a wrapper around the general ExecutionSession::lookup function.
The SearchOrder argument contains a list of (JITDylibs, JITDylibSearchFlags) pairs that describe the search order. The JITDylibs will be searched in the given order to try to find the symbols in the Symbols argument.
The Symbols argument should contain a null-terminated array of (SymbolStringPtr, SymbolLookupFlags) pairs describing the symbols to be searched for. This function takes ownership of the elements of the Symbols array. The Name fields of the Symbols elements are taken to have been retained by the client for this function. The client should not release the Name fields, but are still responsible for destroying the array itself.
The HandleResult function will be called once all searched for symbols have been found, or an error occurs. The HandleResult function will be passed an LLVMErrorRef indicating success or failure, and (on success) a null-terminated LLVMOrcCSymbolMapPairs array containing the function result, and the Ctx value passed to the lookup function.
The client is fully responsible for managing the lifetime of the Ctx object. A common idiom is to allocate the context prior to the lookup and deallocate it in the handler.
THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- K (
LLVMOrcLookupKind): (undocumented)
- SearchOrder (
LLVMOrcCJITDylibSearchOrderElement/object): (undocumented)
- SearchOrderSize (
int): (undocumented)
- Symbols (
LLVMOrcCLookupSetElement/object): (undocumented)
- SymbolsSize (
int): (undocumented)
- HandleResult (
LLVMOrcExecutionSessionLookupHandleResultFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- ES (
C signature
void LLVMOrcExecutionSessionLookup(LLVMOrcExecutionSessionRef ES, LLVMOrcLookupKind K, LLVMOrcCJITDylibSearchOrder SearchOrder, size_t SearchOrderSize, LLVMOrcCLookupSet Symbols, size_t SymbolsSize, LLVMOrcExecutionSessionLookupHandleResultFunction HandleResult, void * Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcRetainSymbolStringPoolEntry(S)#
Increments the ref-count for a SymbolStringPool entry.
- Args:
- S (
LLVMOrcOpaqueSymbolStringPoolEntry/object): (undocumented)
- S (
C signature
void LLVMOrcRetainSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
- rocm.bindings.llvm.c.orc.LLVMOrcReleaseSymbolStringPoolEntry(S)#
Reduces the ref-count for of a SymbolStringPool entry.
- Args:
- S (
LLVMOrcOpaqueSymbolStringPoolEntry/object): (undocumented)
- S (
C signature
void LLVMOrcReleaseSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S)
- rocm.bindings.llvm.c.orc.LLVMOrcSymbolStringPoolEntryStr(S)#
Return the c-string for the given symbol.
This string will remain valid until the entry is freed (once all LLVMOrcSymbolStringPoolEntryRefs have been released).
- Args:
- S (
LLVMOrcOpaqueSymbolStringPoolEntry/object): (undocumented)
- S (
- Returns:
bytes: (undocumented)
C signature
const char * LLVMOrcSymbolStringPoolEntryStr(LLVMOrcSymbolStringPoolEntryRef S)
- rocm.bindings.llvm.c.orc.LLVMOrcReleaseResourceTracker(RT)#
Reduces the ref-count of a ResourceTracker.
- Args:
- RT (
LLVMOrcOpaqueResourceTracker/object): (undocumented)
- RT (
C signature
void LLVMOrcReleaseResourceTracker(LLVMOrcResourceTrackerRef RT)
- rocm.bindings.llvm.c.orc.LLVMOrcResourceTrackerTransferTo(SrcRT, DstRT)#
Transfers tracking of all resources associated with resource tracker SrcRT to resource tracker DstRT.
- Args:
- SrcRT (
LLVMOrcOpaqueResourceTracker/object): (undocumented)
- DstRT (
LLVMOrcOpaqueResourceTracker/object): (undocumented)
- SrcRT (
C signature
void LLVMOrcResourceTrackerTransferTo(LLVMOrcResourceTrackerRef SrcRT, LLVMOrcResourceTrackerRef DstRT)
- rocm.bindings.llvm.c.orc.LLVMOrcResourceTrackerRemove(RT)#
Remove all resources associated with the given tracker.
See ResourceTracker::remove().
- Args:
- RT (
LLVMOrcOpaqueResourceTracker/object): (undocumented)
- RT (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeDefinitionGenerator(DG)#
Dispose of a JITDylib::DefinitionGenerator.
This should only be called if ownership has not been passed to a JITDylib (e.g. because some error prevented the client from calling LLVMOrcJITDylibAddGenerator).
- Args:
- DG (
LLVMOrcOpaqueDefinitionGenerator/object): (undocumented)
- DG (
C signature
void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeMaterializationUnit(MU)#
Dispose of a MaterializationUnit.
- Args:
- MU (
LLVMOrcOpaqueMaterializationUnit/object): (undocumented)
- MU (
C signature
void LLVMOrcDisposeMaterializationUnit(LLVMOrcMaterializationUnitRef MU)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateCustomMaterializationUnit(Name, Ctx, Syms, NumSyms, InitSym, Materialize, Discard, Destroy)#
Create a custom MaterializationUnit.
Name is a name for this MaterializationUnit to be used for identification and logging purposes (e.g. if this MaterializationUnit produces an object buffer then the name of that buffer will be derived from this name).
The Syms list contains the names and linkages of the symbols provided by this unit. This function takes ownership of the elements of the Syms array. The Name fields of the array elements are taken to have been retained for this function. The client should not release the elements of the array, but is still responsible for destroying the array itself.
The InitSym argument indicates whether or not this MaterializationUnit contains static initializers. If three are no static initializers (the common case) then this argument should be null. If there are static initializers then InitSym should be set to a unique name that also appears in the Syms list with the LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly flag set. This function takes ownership of the InitSym, which should have been retained twice on behalf of this function: once for the Syms entry and once for InitSym. If clients wish to use the InitSym value after this function returns they must retain it once more for themselves.
If any of the symbols in the Syms list is looked up then the Materialize function will be called.
If any of the symbols in the Syms list is overridden then the Discard function will be called.
The caller owns the underling MaterializationUnit and is responsible for either passing it to a JITDylib (via LLVMOrcJITDylibDefine) or disposing of it by calling LLVMOrcDisposeMaterializationUnit.
- Args:
- Name (
CStr/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- Syms (
LLVMOrcCSymbolFlagsMapPair/object): (undocumented)
- NumSyms (
int): (undocumented)
- InitSym (
LLVMOrcOpaqueSymbolStringPoolEntry/object): (undocumented)
- Materialize (
LLVMOrcMaterializationUnitMaterializeFunction/object): (undocumented)
- Discard (
LLVMOrcMaterializationUnitDiscardFunction/object): (undocumented)
- Destroy (
LLVMOrcMaterializationUnitDestroyFunction/object): (undocumented)
- Name (
- Returns:
None: (undocumented)
C signature
LLVMOrcMaterializationUnitRef LLVMOrcCreateCustomMaterializationUnit(const char * Name, void * Ctx, LLVMOrcCSymbolFlagsMapPairs Syms, size_t NumSyms, LLVMOrcSymbolStringPoolEntryRef InitSym, LLVMOrcMaterializationUnitMaterializeFunction Materialize, LLVMOrcMaterializationUnitDiscardFunction Discard, LLVMOrcMaterializationUnitDestroyFunction Destroy)
- rocm.bindings.llvm.c.orc.LLVMOrcAbsoluteSymbols(Syms, NumPairs)#
Create a MaterializationUnit to define the given symbols as pointing to the corresponding raw addresses.
This function takes ownership of the elements of the Syms array. The Name fields of the array elements are taken to have been retained for this function. This allows the following pattern…
size_t NumPairs; LLVMOrcCSymbolMapPairs Sym; – Build Syms array – LLVMOrcMaterializationUnitRef MU =
LLVMOrcAbsoluteSymbols(Syms, NumPairs);
… without requiring cleanup of the elements of the Sym array afterwards.
The client is still responsible for deleting the Sym array itself.
If a client wishes to reuse elements of the Sym array after this call they must explicitly retain each of the elements for themselves.
- Args:
- Syms (
LLVMOrcCSymbolMapPair/object): (undocumented)
- NumPairs (
int): (undocumented)
- Syms (
- Returns:
None: (undocumented)
C signature
LLVMOrcMaterializationUnitRef LLVMOrcAbsoluteSymbols(LLVMOrcCSymbolMapPairs Syms, size_t NumPairs)
- rocm.bindings.llvm.c.orc.LLVMOrcLazyReexports(LCTM, ISM, SourceRef, CallableAliases, NumPairs)#
Create a MaterializationUnit to define lazy re-expots.
These are callable entry points that call through to the given symbols.
This function takes ownership of the CallableAliases array. The Name fields of the array elements are taken to have been retained for this function. This allows the following pattern…
size_t NumPairs; LLVMOrcCSymbolAliasMapPairs CallableAliases; – Build CallableAliases array – LLVMOrcMaterializationUnitRef MU =
LLVMOrcLazyReexports(LCTM, ISM, JD, CallableAliases, NumPairs);
… without requiring cleanup of the elements of the CallableAliases array afterwards.
The client is still responsible for deleting the CallableAliases array itself.
If a client wishes to reuse elements of the CallableAliases array after this call they must explicitly retain each of the elements for themselves.
- Args:
- LCTM (
LLVMOrcOpaqueLazyCallThroughManager/object): (undocumented)
- ISM (
LLVMOrcOpaqueIndirectStubsManager/object): (undocumented)
- SourceRef (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- CallableAliases (
LLVMOrcCSymbolAliasMapPair/object): (undocumented)
- NumPairs (
int): (undocumented)
- LCTM (
- Returns:
None: (undocumented)
C signature
LLVMOrcMaterializationUnitRef LLVMOrcLazyReexports(LLVMOrcLazyCallThroughManagerRef LCTM, LLVMOrcIndirectStubsManagerRef ISM, LLVMOrcJITDylibRef SourceRef, LLVMOrcCSymbolAliasMapPairs CallableAliases, size_t NumPairs)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeMaterializationResponsibility(MR)#
Disposes of the passed MaterializationResponsibility object.
This should only be done after the symbols covered by the object have either been resolved and emitted (via LLVMOrcMaterializationResponsibilityNotifyResolved and LLVMOrcMaterializationResponsibilityNotifyEmitted) or failed (via LLVMOrcMaterializationResponsibilityFailMaterialization).
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MR (
C signature
void LLVMOrcDisposeMaterializationResponsibility(LLVMOrcMaterializationResponsibilityRef MR)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityGetTargetDylib(MR)#
Returns the target JITDylib that these symbols are being materialized into.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMOrcJITDylibRef LLVMOrcMaterializationResponsibilityGetTargetDylib(LLVMOrcMaterializationResponsibilityRef MR)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityGetExecutionSession(MR)#
Returns the ExecutionSession for this MaterializationResponsibility.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMOrcExecutionSessionRef LLVMOrcMaterializationResponsibilityGetExecutionSession(LLVMOrcMaterializationResponsibilityRef MR)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityGetSymbols(MR, NumPairs)#
Returns the symbol flags map for this responsibility instance.
The length of the array is returned in NumPairs and the caller is responsible for the returned memory and needs to call LLVMOrcDisposeCSymbolFlagsMap.
To use the returned symbols beyond the livetime of the MaterializationResponsibility requires the caller to retain the symbols explicitly.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- NumPairs (
PointerToUInt64/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMOrcCSymbolFlagsMapPairs LLVMOrcMaterializationResponsibilityGetSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t * NumPairs)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeCSymbolFlagsMap(Pairs)#
Disposes of the passed LLVMOrcCSymbolFlagsMap.
Does not release the entries themselves.
- Args:
- Pairs (
LLVMOrcCSymbolFlagsMapPair/object): (undocumented)
- Pairs (
C signature
void LLVMOrcDisposeCSymbolFlagsMap(LLVMOrcCSymbolFlagsMapPairs Pairs)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityGetInitializerSymbol(MR)#
Returns the initialization pseudo-symbol, if any.
This symbol will also be present in the SymbolFlagsMap for this MaterializationResponsibility object.
The returned symbol is not retained over any mutating operation of the MaterializationResponsbility or beyond the lifetime thereof.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMOrcSymbolStringPoolEntryRef LLVMOrcMaterializationResponsibilityGetInitializerSymbol(LLVMOrcMaterializationResponsibilityRef MR)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityGetRequestedSymbols(MR, NumSymbols)#
Returns the names of any symbols covered by this MaterializationResponsibility object that have queries pending.
This information can be used to return responsibility for unrequested symbols back to the JITDylib via the delegate method.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- NumSymbols (
PointerToUInt64/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMOrcSymbolStringPoolEntryRef * LLVMOrcMaterializationResponsibilityGetRequestedSymbols(LLVMOrcMaterializationResponsibilityRef MR, size_t * NumSymbols)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeSymbols(Symbols)#
Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* .
Does not release the symbols themselves.
C signature
void LLVMOrcDisposeSymbols(LLVMOrcSymbolStringPoolEntryRef * Symbols)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityNotifyResolved(MR, Symbols, NumPairs)#
Notifies the target JITDylib that the given symbols have been resolved.
This will update the given symbols’ addresses in the JITDylib, and notify any pending queries on the given symbols of their resolution. The given symbols must be ones covered by this MaterializationResponsibility instance. Individual calls to this method may resolve a subset of the symbols, but all symbols must have been resolved prior to calling emit.
This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call LLVMOrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by this MaterializationResponsibility then this method is guaranteed to return LLVMErrorSuccess.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- Symbols (
LLVMOrcCSymbolMapPair/object): (undocumented)
- NumPairs (
int): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyResolved(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolMapPairs Symbols, size_t NumPairs)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityNotifyEmitted(MR, SymbolDepGroups, NumSymbolDepGroups)#
Notifies the target JITDylib (and any pending queries on that JITDylib) that all symbols covered by this MaterializationResponsibility instance have been emitted.
This function takes ownership of the symbols in the Dependencies struct. This allows the following pattern…
LLVMOrcSymbolStringPoolEntryRef Names[] = {…}; LLVMOrcCDependenceMapPair Dependence = {JD, {Names, sizeof(Names)}} LLVMOrcMaterializationResponsibilityAddDependencies(JD, Name, &Dependence,
1);
… without requiring cleanup of the elements of the Names array afterwards.
The client is still responsible for deleting the Dependencies.Names arrays, and the Dependencies array itself.
This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call LLVMOrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by this MaterializationResponsibility then this method is guaranteed to return LLVMErrorSuccess.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- SymbolDepGroups (
LLVMOrcCSymbolDependenceGroup/object): (undocumented)
- NumSymbolDepGroups (
int): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcMaterializationResponsibilityNotifyEmitted(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolDependenceGroup * SymbolDepGroups, size_t NumSymbolDepGroups)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityDefineMaterializing(MR, Pairs, NumPairs)#
Attempt to claim responsibility for new definitions.
This method can be used to claim responsibility for symbols that are added to a materialization unit during the compilation process (e.g. literal pool symbols). Symbol linkage rules are the same as for symbols that are defined up front: duplicate strong definitions will result in errors. Duplicate weak definitions will be discarded (in which case they will not be added to this responsibility instance).
This method can be used by materialization units that want to add additional symbols at materialization time (e.g. stubs, compile callbacks, metadata)
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- Pairs (
LLVMOrcCSymbolFlagsMapPair/object): (undocumented)
- NumPairs (
int): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcMaterializationResponsibilityDefineMaterializing(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcCSymbolFlagsMapPairs Pairs, size_t NumPairs)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityFailMaterialization(MR)#
Notify all not-yet-emitted covered by this MaterializationResponsibility instance that an error has occurred.
This will remove all symbols covered by this MaterializationResponsibility from the target JITDylib, and send an error to any queries waiting on these symbols.
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MR (
C signature
void LLVMOrcMaterializationResponsibilityFailMaterialization(LLVMOrcMaterializationResponsibilityRef MR)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityReplace(MR, MU)#
Transfers responsibility to the given MaterializationUnit for all symbols defined by that MaterializationUnit.
This allows materializers to break up work based on run-time information (e.g. by introspecting which symbols have actually been looked up and materializing only those).
- Args:
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- MU (
LLVMOrcOpaqueMaterializationUnit/object): (undocumented)
- MR (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcMaterializationResponsibilityReplace(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcMaterializationUnitRef MU)
- rocm.bindings.llvm.c.orc.LLVMOrcMaterializationResponsibilityDelegate(MR, Symbols, NumSymbols, Result)#
Delegates responsibility for the given symbols to the returned materialization responsibility.
Useful for breaking up work between threads, or different kinds of materialization processes.
The caller retains responsibility of the the passed MaterializationResponsibility.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcMaterializationResponsibilityDelegate(LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcSymbolStringPoolEntryRef * Symbols, size_t NumSymbols, LLVMOrcMaterializationResponsibilityRef * Result)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionCreateBareJITDylib(ES, Name)#
Create a “bare” JITDylib.
The client is responsible for ensuring that the JITDylib’s name is unique, e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
This call does not install any library code or symbols into the newly created JITDylib. The client is responsible for all configuration.
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- Name (
CStr/object): (undocumented)
- ES (
- Returns:
None: (undocumented)
C signature
LLVMOrcJITDylibRef LLVMOrcExecutionSessionCreateBareJITDylib(LLVMOrcExecutionSessionRef ES, const char * Name)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionCreateJITDylib(ES, Result, Name)#
Create a JITDylib.
The client is responsible for ensuring that the JITDylib’s name is unique, e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.
If a Platform is attached to the ExecutionSession then Platform::setupJITDylib will be called to install standard platform symbols (e.g. standard library interposes). If no Platform is installed then this call is equivalent to LLVMExecutionSessionRefCreateBareJITDylib and will always return success.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES, LLVMOrcJITDylibRef * Result, const char * Name)
- rocm.bindings.llvm.c.orc.LLVMOrcExecutionSessionGetJITDylibByName(ES, Name)#
Returns the JITDylib with the given name, or NULL if no such JITDylib exists.
- Args:
- ES (
LLVMOrcOpaqueExecutionSession/object): (undocumented)
- Name (
CStr/object): (undocumented)
- ES (
- Returns:
None: (undocumented)
C signature
LLVMOrcJITDylibRef LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES, const char * Name)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibCreateResourceTracker(JD)#
Return a reference to a newly created resource tracker associated with JD.
The tracker is returned with an initial ref-count of 1, and must be released with LLVMOrcReleaseResourceTracker when no longer needed.
- Args:
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- JD (
- Returns:
None: (undocumented)
C signature
LLVMOrcResourceTrackerRef LLVMOrcJITDylibCreateResourceTracker(LLVMOrcJITDylibRef JD)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibGetDefaultResourceTracker(JD)#
Return a reference to the default resource tracker for the given JITDylib.
This operation will increase the retain count of the tracker: Clients should call LLVMOrcReleaseResourceTracker when the result is no longer needed.
- Args:
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- JD (
- Returns:
None: (undocumented)
C signature
LLVMOrcResourceTrackerRef LLVMOrcJITDylibGetDefaultResourceTracker(LLVMOrcJITDylibRef JD)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibDefine(JD, MU)#
Add the given MaterializationUnit to the given JITDylib.
If this operation succeeds then JITDylib JD will take ownership of MU. If the operation fails then ownership remains with the caller who should call LLVMOrcDisposeMaterializationUnit to destroy it.
- Args:
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- MU (
LLVMOrcOpaqueMaterializationUnit/object): (undocumented)
- JD (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcJITDylibDefine(LLVMOrcJITDylibRef JD, LLVMOrcMaterializationUnitRef MU)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibClear(JD)#
Calls remove on all trackers associated with this JITDylib, see JITDylib::clear().
- Args:
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- JD (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcJITDylibClear(LLVMOrcJITDylibRef JD)
- rocm.bindings.llvm.c.orc.LLVMOrcJITDylibAddGenerator(JD, DG)#
Add a DefinitionGenerator to the given JITDylib.
The JITDylib will take ownership of the given generator: The client is no longer responsible for managing its memory.
- Args:
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- DG (
LLVMOrcOpaqueDefinitionGenerator/object): (undocumented)
- JD (
C signature
void LLVMOrcJITDylibAddGenerator(LLVMOrcJITDylibRef JD, LLVMOrcDefinitionGeneratorRef DG)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateCustomCAPIDefinitionGenerator(F, Ctx, Dispose)#
Create a custom generator.
The F argument will be used to implement the DefinitionGenerator’s tryToGenerate method (see LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).
Ctx is a context object that will be passed to F. This argument is permitted to be null.
Dispose is the disposal function for Ctx. This argument is permitted to be null (in which case the client is responsible for the lifetime of Ctx).
- Args:
- F (
LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- Dispose (
LLVMOrcDisposeCAPIDefinitionGeneratorFunction/object): (undocumented)
- F (
- Returns:
None: (undocumented)
C signature
LLVMOrcDefinitionGeneratorRef LLVMOrcCreateCustomCAPIDefinitionGenerator(LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction F, void * Ctx, LLVMOrcDisposeCAPIDefinitionGeneratorFunction Dispose)
- rocm.bindings.llvm.c.orc.LLVMOrcLookupStateContinueLookup(S, Err)#
Continue a lookup that was suspended in a generator (see LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).
- Args:
- S (
LLVMOrcOpaqueLookupState/object): (undocumented)
- Err (
Pointer/object): (undocumented)
- S (
C signature
void LLVMOrcLookupStateContinueLookup(LLVMOrcLookupStateRef S, LLVMErrorRef Err)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(Result, GlobalPrefx, Filter, FilterCtx)#
Get a DynamicLibrarySearchGenerator that will reflect process symbols into the JITDylib.
On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,
The GlobalPrefix argument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. ‘_’ on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring to dlsym.
The optional Filter and Ctx arguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT’d code. If the Filter argument is null then all process symbols will be visible to JIT’d code. Note that the symbol name passed to the Filter function is the full mangled symbol: The client is responsible for stripping the global prefix if present.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(LLVMOrcDefinitionGeneratorRef * Result, char GlobalPrefx, LLVMOrcSymbolPredicate Filter, void * FilterCtx)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(Result, FileName, GlobalPrefix, Filter, FilterCtx)#
Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect library symbols into the JITDylib.
On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,
The GlobalPrefix argument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. ‘_’ on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring to dlsym.
The optional Filter and Ctx arguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT’d code. If the Filter argument is null then all library symbols will be visible to JIT’d code. Note that the symbol name passed to the Filter function is the full mangled symbol: The client is responsible for stripping the global prefix if present.
THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef * Result, const char * FileName, char GlobalPrefix, LLVMOrcSymbolPredicate Filter, void * FilterCtx)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateStaticLibrarySearchGeneratorForPath(Result, ObjLayer, FileName)#
Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect static library symbols into the JITDylib.
On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,
Call with the optional TargetTriple argument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.
THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcCreateStaticLibrarySearchGeneratorForPath(LLVMOrcDefinitionGeneratorRef * Result, LLVMOrcObjectLayerRef ObjLayer, const char * FileName)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateNewThreadSafeContext()#
Create a ThreadSafeContextRef containing a new LLVMContext.
Ownership of the underlying ThreadSafeContext data is shared: Clients can and should dispose of their ThreadSafeContextRef as soon as they no longer need to refer to it directly. Other references (e.g. from ThreadSafeModules) will keep the underlying data alive as long as it is needed.
- Returns:
None: (undocumented)
C signature
LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContext()
- rocm.bindings.llvm.c.orc.LLVMOrcCreateNewThreadSafeContextFromLLVMContext(Ctx)#
Create a ThreadSafeContextRef from a given LLVMContext, which must not be associated with any existing ThreadSafeContext.
The underlying ThreadSafeContext will take ownership of the LLVMContext object, so clients should not free the LLVMContext passed to this function.
Ownership of the underlying ThreadSafeContext data is shared: Clients can and should dispose of their ThreadSafeContextRef as soon as they no longer need to refer to it directly. Other references (e.g. from ThreadSafeModules) will keep the underlying data alive as long as it is needed.
C signature
LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContextFromLLVMContext(LLVMContextRef Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeThreadSafeContext(TSCtx)#
Dispose of a ThreadSafeContext.
- Args:
- TSCtx (
LLVMOrcOpaqueThreadSafeContext/object): (undocumented)
- TSCtx (
C signature
void LLVMOrcDisposeThreadSafeContext(LLVMOrcThreadSafeContextRef TSCtx)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateNewThreadSafeModule(M, TSCtx)#
Create a ThreadSafeModule wrapper around the given LLVM module.
This takes ownership of the M argument which should not be disposed of or referenced after this function returns.
Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT (e.g. by LLVMOrcLLJITAddLLVMIRModule) then the client is no longer responsible for it. If it is not transferred to the JIT then the client should call LLVMOrcDisposeThreadSafeModule to dispose of it.
- Args:
- M (
Pointer/object): (undocumented)
- TSCtx (
LLVMOrcOpaqueThreadSafeContext/object): (undocumented)
- M (
- Returns:
None: (undocumented)
C signature
LLVMOrcThreadSafeModuleRef LLVMOrcCreateNewThreadSafeModule(LLVMModuleRef M, LLVMOrcThreadSafeContextRef TSCtx)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeThreadSafeModule(TSM)#
Dispose of a ThreadSafeModule.
This should only be called if ownership has not been passed to LLJIT (e.g. because some error prevented the client from adding this to the JIT).
- Args:
- TSM (
LLVMOrcOpaqueThreadSafeModule/object): (undocumented)
- TSM (
C signature
void LLVMOrcDisposeThreadSafeModule(LLVMOrcThreadSafeModuleRef TSM)
- rocm.bindings.llvm.c.orc.LLVMOrcThreadSafeModuleWithModuleDo(TSM, F, Ctx)#
Apply the given function to the module contained in this ThreadSafeModule.
- Args:
- TSM (
LLVMOrcOpaqueThreadSafeModule/object): (undocumented)
- F (
LLVMOrcGenericIRModuleOperationFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- TSM (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcThreadSafeModuleWithModuleDo(LLVMOrcThreadSafeModuleRef TSM, LLVMOrcGenericIRModuleOperationFunction F, void * Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcJITTargetMachineBuilderDetectHost(Result)#
Create a JITTargetMachineBuilder by detecting the host.
On success the client owns the resulting JITTargetMachineBuilder. It must be passed to a consuming operation (e.g. LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder.
C signature
LLVMErrorRef LLVMOrcJITTargetMachineBuilderDetectHost(LLVMOrcJITTargetMachineBuilderRef * Result)
- rocm.bindings.llvm.c.orc.LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(TM)#
Create a JITTargetMachineBuilder from the given TargetMachine template.
This operation takes ownership of the given TargetMachine and destroys it before returing. The resulting JITTargetMachineBuilder is owned by the client and must be passed to a consuming operation (e.g. LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder.
C signature
LLVMOrcJITTargetMachineBuilderRef LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeJITTargetMachineBuilder(JTMB)#
Dispose of a JITTargetMachineBuilder.
- Args:
- JTMB (
LLVMOrcOpaqueJITTargetMachineBuilder/object): (undocumented)
- JTMB (
C signature
void LLVMOrcDisposeJITTargetMachineBuilder(LLVMOrcJITTargetMachineBuilderRef JTMB)
- rocm.bindings.llvm.c.orc.LLVMOrcJITTargetMachineBuilderGetTargetTriple(JTMB)#
Returns the target triple for the given JITTargetMachineBuilder as a string.
The caller owns the resulting string as must dispose of it by calling LLVMDisposeMessage
- Args:
- JTMB (
LLVMOrcOpaqueJITTargetMachineBuilder/object): (undocumented)
- JTMB (
- Returns:
bytes: (undocumented)
C signature
char * LLVMOrcJITTargetMachineBuilderGetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB)
- rocm.bindings.llvm.c.orc.LLVMOrcJITTargetMachineBuilderSetTargetTriple(JTMB, TargetTriple)#
Sets the target triple for the given JITTargetMachineBuilder to the given string.
- Args:
- JTMB (
LLVMOrcOpaqueJITTargetMachineBuilder/object): (undocumented)
- TargetTriple (
CStr/object): (undocumented)
- JTMB (
C signature
void LLVMOrcJITTargetMachineBuilderSetTargetTriple(LLVMOrcJITTargetMachineBuilderRef JTMB, const char * TargetTriple)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectLayerAddObjectFile(ObjLayer, JD, ObjBuffer)#
Add an object to an ObjectLayer to the given JITDylib.
Adds a buffer representing an object file to the given JITDylib using the given ObjectLayer instance. This operation transfers ownership of the buffer to the ObjectLayer 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 ResourceTracker.
- Args:
- ObjLayer (
LLVMOrcOpaqueObjectLayer/object): (undocumented)
- JD (
LLVMOrcOpaqueJITDylib/object): (undocumented)
- ObjBuffer (
Pointer/object): (undocumented)
- ObjLayer (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcObjectLayerAddObjectFile(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectLayerAddObjectFileWithRT(ObjLayer, RT, ObjBuffer)#
Add an object to an ObjectLayer using the given ResourceTracker.
Adds a buffer representing an object file to the given ResourceTracker’s JITDylib using the given ObjectLayer instance. This operation transfers ownership of the buffer to the ObjectLayer 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:
- ObjLayer (
LLVMOrcOpaqueObjectLayer/object): (undocumented)
- RT (
LLVMOrcOpaqueResourceTracker/object): (undocumented)
- ObjBuffer (
Pointer/object): (undocumented)
- ObjLayer (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcObjectLayerAddObjectFileWithRT(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcResourceTrackerRef RT, LLVMMemoryBufferRef ObjBuffer)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectLayerEmit(ObjLayer, R, ObjBuffer)#
Emit an object buffer to an ObjectLayer.
Ownership of the responsibility object and object buffer pass to this function. The client is not responsible for cleanup.
- Args:
- ObjLayer (
LLVMOrcOpaqueObjectLayer/object): (undocumented)
- R (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- ObjBuffer (
Pointer/object): (undocumented)
- ObjLayer (
C signature
void LLVMOrcObjectLayerEmit(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcMaterializationResponsibilityRef R, LLVMMemoryBufferRef ObjBuffer)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeObjectLayer(ObjLayer)#
Dispose of an ObjectLayer.
- Args:
- ObjLayer (
LLVMOrcOpaqueObjectLayer/object): (undocumented)
- ObjLayer (
C signature
void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer)
- rocm.bindings.llvm.c.orc.LLVMOrcIRTransformLayerEmit(IRTransformLayer, MR, TSM)#
Dispose of an ObjectLayer.
- Args:
- IRTransformLayer (
LLVMOrcOpaqueIRTransformLayer/object): (undocumented)
- MR (
LLVMOrcOpaqueMaterializationResponsibility/object): (undocumented)
- TSM (
LLVMOrcOpaqueThreadSafeModule/object): (undocumented)
- IRTransformLayer (
C signature
void LLVMOrcIRTransformLayerEmit(LLVMOrcIRTransformLayerRef IRTransformLayer, LLVMOrcMaterializationResponsibilityRef MR, LLVMOrcThreadSafeModuleRef TSM)
- rocm.bindings.llvm.c.orc.LLVMOrcIRTransformLayerSetTransform(IRTransformLayer, TransformFunction, Ctx)#
Set the transform function of the provided transform layer, passing through a pointer to user provided context.
- Args:
- IRTransformLayer (
LLVMOrcOpaqueIRTransformLayer/object): (undocumented)
- TransformFunction (
LLVMOrcIRTransformLayerTransformFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- IRTransformLayer (
C signature
void LLVMOrcIRTransformLayerSetTransform(LLVMOrcIRTransformLayerRef IRTransformLayer, LLVMOrcIRTransformLayerTransformFunction TransformFunction, void * Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcObjectTransformLayerSetTransform(ObjTransformLayer, TransformFunction, Ctx)#
Set the transform function on an LLVMOrcObjectTransformLayer.
- Args:
- ObjTransformLayer (
LLVMOrcOpaqueObjectTransformLayer/object): (undocumented)
- TransformFunction (
LLVMOrcObjectTransformLayerTransformFunction/object): (undocumented)
- Ctx (
Pointer/object): (undocumented)
- ObjTransformLayer (
C signature
void LLVMOrcObjectTransformLayerSetTransform(LLVMOrcObjectTransformLayerRef ObjTransformLayer, LLVMOrcObjectTransformLayerTransformFunction TransformFunction, void * Ctx)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateLocalIndirectStubsManager(TargetTriple)#
Create a LocalIndirectStubsManager from the given target triple.
The resulting IndirectStubsManager is owned by the client and must be disposed of by calling LLVMOrcDisposeDisposeIndirectStubsManager.
C signature
LLVMOrcIndirectStubsManagerRef LLVMOrcCreateLocalIndirectStubsManager(const char * TargetTriple)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeIndirectStubsManager(ISM)#
Dispose of an IndirectStubsManager.
- Args:
- ISM (
LLVMOrcOpaqueIndirectStubsManager/object): (undocumented)
- ISM (
C signature
void LLVMOrcDisposeIndirectStubsManager(LLVMOrcIndirectStubsManagerRef ISM)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateLocalLazyCallThroughManager(TargetTriple, ES, ErrorHandlerAddr, LCTM)#
Dispose of an IndirectStubsManager.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcCreateLocalLazyCallThroughManager(const char * TargetTriple, LLVMOrcExecutionSessionRef ES, LLVMOrcJITTargetAddress ErrorHandlerAddr, LLVMOrcLazyCallThroughManagerRef * LCTM)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeLazyCallThroughManager(LCTM)#
Dispose of an LazyCallThroughManager.
- Args:
- LCTM (
LLVMOrcOpaqueLazyCallThroughManager/object): (undocumented)
- LCTM (
C signature
void LLVMOrcDisposeLazyCallThroughManager(LLVMOrcLazyCallThroughManagerRef LCTM)
- rocm.bindings.llvm.c.orc.LLVMOrcCreateDumpObjects(DumpDir, IdentifierOverride)#
Create a DumpObjects instance.
DumpDir specifies the path to write dumped objects to. DumpDir may be empty in which case files will be dumped to the working directory.
IdentifierOverride specifies a file name stem to use when dumping objects. If empty then each MemoryBuffer’s identifier will be used (with a .o suffix added if not already present). If an identifier override is supplied it will be used instead, along with an incrementing counter (since all buffers will use the same identifier, the resulting files will be named <ident>.o, <ident>.2.o, <ident>.3.o, and so on). IdentifierOverride should not contain an extension, as a .o suffix will be added by DumpObjects.
- Args:
- Returns:
None: (undocumented)
C signature
LLVMOrcDumpObjectsRef LLVMOrcCreateDumpObjects(const char * DumpDir, const char * IdentifierOverride)
- rocm.bindings.llvm.c.orc.LLVMOrcDisposeDumpObjects(DumpObjects)#
Dispose of a DumpObjects instance.
- Args:
- DumpObjects (
LLVMOrcOpaqueDumpObjects/object): (undocumented)
- DumpObjects (
C signature
void LLVMOrcDisposeDumpObjects(LLVMOrcDumpObjectsRef DumpObjects)
- rocm.bindings.llvm.c.orc.LLVMOrcDumpObjects_CallOperator(DumpObjects, ObjBuffer)#
Dump the contents of the given MemoryBuffer.
- Args:
- DumpObjects (
LLVMOrcOpaqueDumpObjects/object): (undocumented)
- ObjBuffer (
Pointer/object): (undocumented)
- DumpObjects (
- Returns:
None: (undocumented)
C signature
LLVMErrorRef LLVMOrcDumpObjects_CallOperator(LLVMOrcDumpObjectsRef DumpObjects, LLVMMemoryBufferRef * ObjBuffer)