rocm.bindings.llvm.c.target#
2026-09-24
13 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
(No short description) |
|
(No short description) |
|
(No short description) |
Functions#
|
|
LLVMInitializeAllTargetInfos - The main program should call this function if |
|
LLVMInitializeAllTargets - The main program should call this function if it |
|
LLVMInitializeAllTargetMCs - The main program should call this function if |
|
LLVMInitializeAllAsmPrinters - The main program should call this function if |
|
LLVMInitializeAllAsmParsers - The main program should call this function if |
|
LLVMInitializeAllDisassemblers - The main program should call this function |
|
LLVMInitializeNativeTarget - The main program should call this function to |
|
LLVMInitializeNativeTargetAsmParser - The main program should call this |
|
LLVMInitializeNativeTargetAsmPrinter - The main program should call this |
|
LLVMInitializeNativeTargetDisassembler - The main program should call this |
|
Obtain the data layout for a module. |
|
|
Set the data layout for a module. |
|
Creates target data from a target layout string. |
Deallocates a TargetData. |
|
|
Adds target library information to a pass manager. |
Converts target data to a target layout string. |
|
|
Returns the byte order of a target, either LLVMBigEndian or |
|
Returns the pointer size in bytes for a target. |
|
Returns the pointer size in bytes for a target for a specified |
|
Returns the integer type that is the same size as a pointer on a target. |
|
Returns the integer type that is the same size as a pointer on a target. |
|
Returns the integer type that is the same size as a pointer on a target. |
|
Returns the integer type that is the same size as a pointer on a target. |
|
Computes the size of a type in bits for a target. |
|
Computes the storage size of a type in bytes for a target. |
|
Computes the ABI size of a type in bytes for a target. |
|
Computes the ABI alignment of a type in bytes for a target. |
|
Computes the call frame alignment of a type in bytes for a target. |
|
Computes the preferred alignment of a type in bytes for a target. |
|
Computes the preferred alignment of a global variable in bytes for a target. |
|
Computes the structure element that contains the byte offset for a target. |
|
Computes the byte offset of the indexed struct element for a target. |
Module Contents#
- class rocm.bindings.llvm.c.target.LLVMByteOrdering#
Bases:
enum.IntEnum(No short description)
- class rocm.bindings.llvm.c.target.LLVMOpaqueTargetData(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.target.LLVMTargetDataRef#
- class rocm.bindings.llvm.c.target.LLVMOpaqueTargetLibraryInfotData(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- rocm.bindings.llvm.c.target.LLVMTargetLibraryInfoRef#
- rocm.bindings.llvm.c.target.LLVMInitializeAllTargetInfos()#
LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support.
C signature
void LLVMInitializeAllTargetInfos()
- rocm.bindings.llvm.c.target.LLVMInitializeAllTargets()#
LLVMInitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support.
C signature
void LLVMInitializeAllTargets()
- rocm.bindings.llvm.c.target.LLVMInitializeAllTargetMCs()#
LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support.
C signature
void LLVMInitializeAllTargetMCs()
- rocm.bindings.llvm.c.target.LLVMInitializeAllAsmPrinters()#
LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry.
C signature
void LLVMInitializeAllAsmPrinters()
- rocm.bindings.llvm.c.target.LLVMInitializeAllAsmParsers()#
LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry.
C signature
void LLVMInitializeAllAsmParsers()
- rocm.bindings.llvm.c.target.LLVMInitializeAllDisassemblers()#
LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry.
C signature
void LLVMInitializeAllDisassemblers()
- rocm.bindings.llvm.c.target.LLVMInitializeNativeTarget()#
LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host.
This is useful for JIT applications to ensure that the target gets linked in correctly.
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMInitializeNativeTarget()
- rocm.bindings.llvm.c.target.LLVMInitializeNativeAsmParser()#
LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the parser for the native target corresponding to the host.
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMInitializeNativeAsmParser()
- rocm.bindings.llvm.c.target.LLVMInitializeNativeAsmPrinter()#
LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the printer for the native target corresponding to the host.
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMInitializeNativeAsmPrinter()
- rocm.bindings.llvm.c.target.LLVMInitializeNativeDisassembler()#
LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the disassembler for the native target corresponding to the host.
- Returns:
int: (undocumented)
C signature
LLVMBool LLVMInitializeNativeDisassembler()
- rocm.bindings.llvm.c.target.LLVMGetModuleDataLayout(M)#
Obtain the data layout for a module.
C signature
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
- rocm.bindings.llvm.c.target.LLVMSetModuleDataLayout(M, DL)#
Set the data layout for a module.
- See:
Module::setDataLayout()
- Args:
- M (
Pointer/object): (undocumented)
- DL (
LLVMOpaqueTargetData/object): (undocumented)
- M (
C signature
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
- rocm.bindings.llvm.c.target.LLVMCreateTargetData(StringRep)#
Creates target data from a target layout string.
See the constructor llvm::DataLayout::DataLayout.
C signature
LLVMTargetDataRef LLVMCreateTargetData(const char * StringRep)
- rocm.bindings.llvm.c.target.LLVMDisposeTargetData(TD)#
Deallocates a TargetData.
See the destructor llvm::DataLayout::~DataLayout.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- TD (
C signature
void LLVMDisposeTargetData(LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMAddTargetLibraryInfo(TLI, PM)#
Adds target library information to a pass manager.
This does not take ownership of the target library info. See the method llvm::PassManagerBase::add.
- Args:
- TLI (
LLVMOpaqueTargetLibraryInfotData/object): (undocumented)
- PM (
Pointer/object): (undocumented)
- TLI (
C signature
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
- rocm.bindings.llvm.c.target.LLVMCopyStringRepOfTargetData(TD)#
Converts target data to a target layout string.
The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- TD (
- Returns:
bytes: (undocumented)
C signature
char * LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMByteOrder(TD)#
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
See the method llvm::DataLayout::isLittleEndian.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- TD (
- Returns:
LLVMByteOrdering: (undocumented)
C signature
enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMPointerSize(TD)#
Returns the pointer size in bytes for a target.
See the method llvm::DataLayout::getPointerSize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMPointerSize(LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMPointerSizeForAS(TD, AS)#
Returns the pointer size in bytes for a target for a specified address space.
See the method llvm::DataLayout::getPointerSize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- AS (
int): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned int AS)
- rocm.bindings.llvm.c.target.LLVMIntPtrType(TD)#
Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- TD (
- Returns:
None: (undocumented)
C signature
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMIntPtrTypeForAS(TD, AS)#
Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- AS (
int): (undocumented)
- TD (
- Returns:
None: (undocumented)
C signature
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned int AS)
- rocm.bindings.llvm.c.target.LLVMIntPtrTypeInContext(C, TD)#
Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType.
- Args:
- C (
Pointer/object): (undocumented)
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- C (
- Returns:
None: (undocumented)
C signature
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
- rocm.bindings.llvm.c.target.LLVMIntPtrTypeForASInContext(C, TD, AS)#
Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.
- Args:
- C (
Pointer/object): (undocumented)
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- AS (
int): (undocumented)
- C (
- Returns:
None: (undocumented)
C signature
LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned int AS)
- rocm.bindings.llvm.c.target.LLVMSizeOfTypeInBits(TD, Ty)#
Computes the size of a type in bits for a target.
See the method llvm::DataLayout::getTypeSizeInBits.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMStoreSizeOfType(TD, Ty)#
Computes the storage size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeStoreSize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMABISizeOfType(TD, Ty)#
Computes the ABI size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeAllocSize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMABIAlignmentOfType(TD, Ty)#
Computes the ABI alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMCallFrameAlignmentOfType(TD, Ty)#
Computes the call frame alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMPreferredAlignmentOfType(TD, Ty)#
Computes the preferred alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- Ty (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
- rocm.bindings.llvm.c.target.LLVMPreferredAlignmentOfGlobal(TD, GlobalVar)#
Computes the preferred alignment of a global variable in bytes for a target.
See the method llvm::DataLayout::getPreferredAlignment.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- GlobalVar (
Pointer/object): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
- rocm.bindings.llvm.c.target.LLVMElementAtOffset(TD, StructTy, Offset)#
Computes the structure element that contains the byte offset for a target.
See the method llvm::StructLayout::getElementContainingOffset.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- StructTy (
Pointer/object): (undocumented)
- Offset (
int): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned int LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
- rocm.bindings.llvm.c.target.LLVMOffsetOfElement(TD, StructTy, Element)#
Computes the byte offset of the indexed struct element for a target.
See the method llvm::StructLayout::getElementContainingOffset.
- Args:
- TD (
LLVMOpaqueTargetData/object): (undocumented)
- StructTy (
Pointer/object): (undocumented)
- Element (
int): (undocumented)
- TD (
- Returns:
int: (undocumented)
C signature
unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned int Element)