MLIR  19.0.0git
Typedefs | Enumerations | Functions
LLVM.h File Reference
#include "mlir-c/IR.h"
#include "mlir-c/Support.h"

Go to the source code of this file.

Typedefs

typedef enum MlirLLVMCConv MlirLLVMCConv
 
typedef enum MlirLLVMComdat MlirLLVMComdat
 
typedef enum MlirLLVMLinkage MlirLLVMLinkage
 
typedef enum MlirLLVMTypeEncoding MlirLLVMTypeEncoding
 
typedef enum MlirLLVMDIEmissionKind MlirLLVMDIEmissionKind
 
typedef enum MlirLLVMDINameTableKind MlirLLVMDINameTableKind
 

Enumerations

enum  MlirLLVMCConv {
  MlirLLVMCConvC = 0 , MlirLLVMCConvFast = 8 , MlirLLVMCConvCold = 9 , MlirLLVMCConvGHC = 10 ,
  MlirLLVMCConvHiPE = 11 , MlirLLVMCConvAnyReg = 13 , MlirLLVMCConvPreserveMost = 14 , MlirLLVMCConvPreserveAll = 15 ,
  MlirLLVMCConvSwift = 16 , MlirLLVMCConvCXX_FAST_TLS = 17 , MlirLLVMCConvTail = 18 , MlirLLVMCConvCFGuard_Check = 19 ,
  MlirLLVMCConvSwiftTail = 20 , MlirLLVMCConvX86_StdCall = 64 , MlirLLVMCConvX86_FastCall = 65 , MlirLLVMCConvARM_APCS = 66 ,
  MlirLLVMCConvARM_AAPCS = 67 , MlirLLVMCConvARM_AAPCS_VFP = 68 , MlirLLVMCConvMSP430_INTR = 69 , MlirLLVMCConvX86_ThisCall = 70 ,
  MlirLLVMCConvPTX_Kernel = 71 , MlirLLVMCConvPTX_Device = 72 , MlirLLVMCConvSPIR_FUNC = 75 , MlirLLVMCConvSPIR_KERNEL = 76 ,
  MlirLLVMCConvIntel_OCL_BI = 77 , MlirLLVMCConvX86_64_SysV = 78 , MlirLLVMCConvWin64 = 79 , MlirLLVMCConvX86_VectorCall = 80 ,
  MlirLLVMCConvDUMMY_HHVM = 81 , MlirLLVMCConvDUMMY_HHVM_C = 82 , MlirLLVMCConvX86_INTR = 83 , MlirLLVMCConvAVR_INTR = 84 ,
  MlirLLVMCConvAVR_BUILTIN = 86 , MlirLLVMCConvAMDGPU_VS = 87 , MlirLLVMCConvAMDGPU_GS = 88 , MlirLLVMCConvAMDGPU_CS = 90 ,
  MlirLLVMCConvAMDGPU_KERNEL = 91 , MlirLLVMCConvX86_RegCall = 92 , MlirLLVMCConvAMDGPU_HS = 93 , MlirLLVMCConvMSP430_BUILTIN = 94 ,
  MlirLLVMCConvAMDGPU_LS = 95 , MlirLLVMCConvAMDGPU_ES = 96 , MlirLLVMCConvAArch64_VectorCall = 97 , MlirLLVMCConvAArch64_SVE_VectorCall = 98 ,
  MlirLLVMCConvWASM_EmscriptenInvoke = 99 , MlirLLVMCConvAMDGPU_Gfx = 100 , MlirLLVMCConvM68k_INTR = 101
}
 
enum  MlirLLVMComdat {
  MlirLLVMComdatAny = 0 , MlirLLVMComdatExactMatch = 1 , MlirLLVMComdatLargest = 2 , MlirLLVMComdatNoDeduplicate = 3 ,
  MlirLLVMComdatSameSize = 4
}
 
enum  MlirLLVMLinkage {
  MlirLLVMLinkagePrivate = 0 , MlirLLVMLinkageInternal = 1 , MlirLLVMLinkageAvailableExternally = 2 , MlirLLVMLinkageLinkonce = 3 ,
  MlirLLVMLinkageWeak = 4 , MlirLLVMLinkageCommon = 5 , MlirLLVMLinkageAppending = 6 , MlirLLVMLinkageExternWeak = 7 ,
  MlirLLVMLinkageLinkonceODR = 8 , MlirLLVMLinkageWeakODR = 9 , MlirLLVMLinkageExternal = 10
}
 
enum  MlirLLVMTypeEncoding {
  MlirLLVMTypeEncodingAddress = 0x1 , MlirLLVMTypeEncodingBoolean = 0x2 , MlirLLVMTypeEncodingComplexFloat = 0x31 , MlirLLVMTypeEncodingFloatT = 0x4 ,
  MlirLLVMTypeEncodingSigned = 0x5 , MlirLLVMTypeEncodingSignedChar = 0x6 , MlirLLVMTypeEncodingUnsigned = 0x7 , MlirLLVMTypeEncodingUnsignedChar = 0x08 ,
  MlirLLVMTypeEncodingImaginaryFloat = 0x09 , MlirLLVMTypeEncodingPackedDecimal = 0x0a , MlirLLVMTypeEncodingNumericString = 0x0b , MlirLLVMTypeEncodingEdited = 0x0c ,
  MlirLLVMTypeEncodingSignedFixed = 0x0d , MlirLLVMTypeEncodingUnsignedFixed = 0x0e , MlirLLVMTypeEncodingDecimalFloat = 0x0f , MlirLLVMTypeEncodingUTF = 0x10 ,
  MlirLLVMTypeEncodingUCS = 0x11 , MlirLLVMTypeEncodingASCII = 0x12 , MlirLLVMTypeEncodingLoUser = 0x80 , MlirLLVMTypeEncodingHiUser = 0xff
}
 
enum  MlirLLVMDIEmissionKind { MlirLLVMDIEmissionKindNone = 0 , MlirLLVMDIEmissionKindFull = 1 , MlirLLVMDIEmissionKindLineTablesOnly = 2 , MlirLLVMDIEmissionKindDebugDirectivesOnly = 3 }
 
enum  MlirLLVMDINameTableKind { MlirLLVMDINameTableKindDefault = 0 , MlirLLVMDINameTableKindGNU = 1 , MlirLLVMDINameTableKindNone = 2 , MlirLLVMDINameTableKindApple = 3 }
 

Functions

 MLIR_DECLARE_CAPI_DIALECT_REGISTRATION (LLVM, llvm)
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet (MlirContext ctx, unsigned addressSpace)
 Creates an llvm.ptr type. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet (MlirContext ctx)
 Creates an llmv.void type. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet (MlirType elementType, unsigned numElements)
 Creates an llvm.array type. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGet (MlirType resultType, intptr_t nArgumentTypes, MlirType const *argumentTypes, bool isVarArg)
 Creates an llvm.func type. More...
 
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMStructType (MlirType type)
 Returns true if the type is an LLVM dialect struct type. More...
 
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsLiteral (MlirType type)
 Returns true if the type is a literal (unnamed) LLVM struct type. More...
 
MLIR_CAPI_EXPORTED intptr_t mlirLLVMStructTypeGetNumElementTypes (MlirType type)
 Returns the number of fields in the struct. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeGetElementType (MlirType type, intptr_t position)
 Returns the positions-th field of the struct. More...
 
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsPacked (MlirType type)
 Returns true if the struct is packed. More...
 
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetIdentifier (MlirType type)
 Returns the identifier of the identified struct. More...
 
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsOpaque (MlirType type)
 Returns true is the struct is explicitly opaque (will not have a body) or uninitialized (will eventually have a body). More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGet (MlirContext ctx, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
 Creates an LLVM literal (unnamed) struct type. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGetChecked (MlirLocation loc, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
 Creates an LLVM literal (unnamed) struct type if possible. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedGet (MlirContext ctx, MlirStringRef name)
 Creates an LLVM identified struct type with no body. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedNewGet (MlirContext ctx, MlirStringRef name, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
 Creates an LLVM identified struct type with no body and a name starting with the given prefix. More...
 
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet (MlirContext ctx, MlirStringRef name)
 
MLIR_CAPI_EXPORTED MlirLogicalResult mlirLLVMStructTypeSetBody (MlirType structType, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
 Sets the body of the identified struct if it hasn't been set yet. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet (MlirContext ctx, MlirLLVMCConv cconv)
 Creates a LLVM CConv attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet (MlirContext ctx, MlirLLVMComdat comdat)
 Creates a LLVM Comdat attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMLinkageAttrGet (MlirContext ctx, MlirLLVMLinkage linkage)
 Creates a LLVM Linkage attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet (MlirContext ctx)
 Creates a LLVM DINullType attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionElemAttrGet (MlirContext ctx, unsigned int opcode, intptr_t nArguments, uint64_t const *arguments)
 Creates a LLVM DIExpressionElem attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionAttrGet (MlirContext ctx, intptr_t nOperations, MlirAttribute const *operations)
 Creates a LLVM DIExpression attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIBasicTypeAttrGet (MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits, MlirLLVMTypeEncoding encoding)
 Creates a LLVM DIBasicType attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompositeTypeAttrGet (MlirContext ctx, unsigned int tag, MlirAttribute recId, MlirAttribute name, MlirAttribute file, uint32_t line, MlirAttribute scope, MlirAttribute baseType, int64_t flags, uint64_t sizeInBits, uint64_t alignInBits, intptr_t nElements, MlirAttribute const *elements)
 Creates a LLVM DICompositeType attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGet (MlirContext ctx, unsigned int tag, MlirAttribute name, MlirAttribute baseType, uint64_t sizeInBits, uint32_t alignInBits, uint64_t offsetInBits, MlirAttribute extraData)
 Creates a LLVM DIDerivedType attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGetBaseType (MlirAttribute diDerivedType)
 Gets the base type from a LLVM DIDerivedType attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet (MlirContext ctx, MlirAttribute name, MlirAttribute directory)
 Creates a LLVM DIFileAttr attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompileUnitAttrGet (MlirContext ctx, MlirAttribute id, unsigned int sourceLanguage, MlirAttribute file, MlirAttribute producer, bool isOptimized, MlirLLVMDIEmissionKind emissionKind, MlirLLVMDINameTableKind nameTableKind)
 Creates a LLVM DICompileUnit attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet (MlirContext ctx, uint64_t value)
 Creates a LLVM DIFlags attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockAttrGet (MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int line, unsigned int column)
 Creates a LLVM DILexicalBlock attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockFileAttrGet (MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int discriminator)
 Creates a LLVM DILexicalBlockFile attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILocalVariableAttrGet (MlirContext ctx, MlirAttribute scope, MlirAttribute name, MlirAttribute diFile, unsigned int line, unsigned int arg, unsigned int alignInBits, MlirAttribute diType)
 Creates a LLVM DILocalVariableAttr attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGet (MlirContext ctx, MlirAttribute id, MlirAttribute compileUnit, MlirAttribute scope, MlirAttribute name, MlirAttribute linkageName, MlirAttribute file, unsigned int line, unsigned int scopeLine, uint64_t subprogramFlags, MlirAttribute type)
 Creates a LLVM DISubprogramAttr attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetScope (MlirAttribute diSubprogram)
 Gets the scope from this DISubprogramAttr. More...
 
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetLine (MlirAttribute diSubprogram)
 Gets the line from this DISubprogramAttr. More...
 
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetScopeLine (MlirAttribute diSubprogram)
 Gets the scope line from this DISubprogram. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetCompileUnit (MlirAttribute diSubprogram)
 Gets the compile unit from this DISubprogram. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetFile (MlirAttribute diSubprogram)
 Gets the file from this DISubprogramAttr. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetType (MlirAttribute diSubprogram)
 Gets the type from this DISubprogramAttr. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubroutineTypeAttrGet (MlirContext ctx, unsigned int callingConvention, intptr_t nTypes, MlirAttribute const *types)
 Creates a LLVM DISubroutineTypeAttr attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGet (MlirContext ctx, MlirAttribute file, MlirAttribute scope, MlirAttribute name, MlirAttribute configMacros, MlirAttribute includePath, MlirAttribute apinotes, unsigned int line, bool isDecl)
 Creates a LLVM DIModuleAttr attribute. More...
 
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGetScope (MlirAttribute diModule)
 Gets the scope of this DIModuleAttr. More...
 

Typedef Documentation

◆ MlirLLVMCConv

Definition at line 99 of file LLVM.h.

◆ MlirLLVMComdat

Definition at line 154 of file LLVM.h.

◆ MlirLLVMDIEmissionKind

Definition at line 248 of file LLVM.h.

◆ MlirLLVMDINameTableKind

Definition at line 248 of file LLVM.h.

◆ MlirLLVMLinkage

Definition at line 167 of file LLVM.h.

◆ MlirLLVMTypeEncoding

Definition at line 198 of file LLVM.h.

Enumeration Type Documentation

◆ MlirLLVMCConv

Enumerator
MlirLLVMCConvC 
MlirLLVMCConvFast 
MlirLLVMCConvCold 
MlirLLVMCConvGHC 
MlirLLVMCConvHiPE 
MlirLLVMCConvAnyReg 
MlirLLVMCConvPreserveMost 
MlirLLVMCConvPreserveAll 
MlirLLVMCConvSwift 
MlirLLVMCConvCXX_FAST_TLS 
MlirLLVMCConvTail 
MlirLLVMCConvCFGuard_Check 
MlirLLVMCConvSwiftTail 
MlirLLVMCConvX86_StdCall 
MlirLLVMCConvX86_FastCall 
MlirLLVMCConvARM_APCS 
MlirLLVMCConvARM_AAPCS 
MlirLLVMCConvARM_AAPCS_VFP 
MlirLLVMCConvMSP430_INTR 
MlirLLVMCConvX86_ThisCall 
MlirLLVMCConvPTX_Kernel 
MlirLLVMCConvPTX_Device 
MlirLLVMCConvSPIR_FUNC 
MlirLLVMCConvSPIR_KERNEL 
MlirLLVMCConvIntel_OCL_BI 
MlirLLVMCConvX86_64_SysV 
MlirLLVMCConvWin64 
MlirLLVMCConvX86_VectorCall 
MlirLLVMCConvDUMMY_HHVM 
MlirLLVMCConvDUMMY_HHVM_C 
MlirLLVMCConvX86_INTR 
MlirLLVMCConvAVR_INTR 
MlirLLVMCConvAVR_BUILTIN 
MlirLLVMCConvAMDGPU_VS 
MlirLLVMCConvAMDGPU_GS 
MlirLLVMCConvAMDGPU_CS 
MlirLLVMCConvAMDGPU_KERNEL 
MlirLLVMCConvX86_RegCall 
MlirLLVMCConvAMDGPU_HS 
MlirLLVMCConvMSP430_BUILTIN 
MlirLLVMCConvAMDGPU_LS 
MlirLLVMCConvAMDGPU_ES 
MlirLLVMCConvAArch64_VectorCall 
MlirLLVMCConvAArch64_SVE_VectorCall 
MlirLLVMCConvWASM_EmscriptenInvoke 
MlirLLVMCConvAMDGPU_Gfx 
MlirLLVMCConvM68k_INTR 

Definition at line 102 of file LLVM.h.

◆ MlirLLVMComdat

Enumerator
MlirLLVMComdatAny 
MlirLLVMComdatExactMatch 
MlirLLVMComdatLargest 
MlirLLVMComdatNoDeduplicate 
MlirLLVMComdatSameSize 

Definition at line 157 of file LLVM.h.

◆ MlirLLVMDIEmissionKind

Enumerator
MlirLLVMDIEmissionKindNone 
MlirLLVMDIEmissionKindFull 
MlirLLVMDIEmissionKindLineTablesOnly 
MlirLLVMDIEmissionKindDebugDirectivesOnly 

Definition at line 252 of file LLVM.h.

◆ MlirLLVMDINameTableKind

Enumerator
MlirLLVMDINameTableKindDefault 
MlirLLVMDINameTableKindGNU 
MlirLLVMDINameTableKindNone 
MlirLLVMDINameTableKindApple 

Definition at line 260 of file LLVM.h.

◆ MlirLLVMLinkage

Enumerator
MlirLLVMLinkagePrivate 
MlirLLVMLinkageInternal 
MlirLLVMLinkageAvailableExternally 
MlirLLVMLinkageLinkonce 
MlirLLVMLinkageWeak 
MlirLLVMLinkageCommon 
MlirLLVMLinkageAppending 
MlirLLVMLinkageExternWeak 
MlirLLVMLinkageLinkonceODR 
MlirLLVMLinkageWeakODR 
MlirLLVMLinkageExternal 

Definition at line 170 of file LLVM.h.

◆ MlirLLVMTypeEncoding

Enumerator
MlirLLVMTypeEncodingAddress 
MlirLLVMTypeEncodingBoolean 
MlirLLVMTypeEncodingComplexFloat 
MlirLLVMTypeEncodingFloatT 
MlirLLVMTypeEncodingSigned 
MlirLLVMTypeEncodingSignedChar 
MlirLLVMTypeEncodingUnsigned 
MlirLLVMTypeEncodingUnsignedChar 
MlirLLVMTypeEncodingImaginaryFloat 
MlirLLVMTypeEncodingPackedDecimal 
MlirLLVMTypeEncodingNumericString 
MlirLLVMTypeEncodingEdited 
MlirLLVMTypeEncodingSignedFixed 
MlirLLVMTypeEncodingUnsignedFixed 
MlirLLVMTypeEncodingDecimalFloat 
MlirLLVMTypeEncodingUTF 
MlirLLVMTypeEncodingUCS 
MlirLLVMTypeEncodingASCII 
MlirLLVMTypeEncodingLoUser 
MlirLLVMTypeEncodingHiUser 

Definition at line 201 of file LLVM.h.

Function Documentation

◆ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION()

MLIR_DECLARE_CAPI_DIALECT_REGISTRATION ( LLVM  ,
llvm   
)

◆ mlirLLVMArrayTypeGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet ( MlirType  elementType,
unsigned  numElements 
)

Creates an llvm.array type.

Definition at line 34 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMCConvAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet ( MlirContext  ctx,
MlirLLVMCConv  cconv 
)

Creates a LLVM CConv attribute.

Definition at line 187 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMComdatAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet ( MlirContext  ctx,
MlirLLVMComdat  comdat 
)

Creates a LLVM Comdat attribute.

Definition at line 191 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIBasicTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIBasicTypeAttrGet ( MlirContext  ctx,
unsigned int  tag,
MlirAttribute  name,
uint64_t  sizeInBits,
MlirLLVMTypeEncoding  encoding 
)

Creates a LLVM DIBasicType attribute.

Definition at line 145 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDICompileUnitAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompileUnitAttrGet ( MlirContext  ctx,
MlirAttribute  id,
unsigned int  sourceLanguage,
MlirAttribute  file,
MlirAttribute  producer,
bool  isOptimized,
MlirLLVMDIEmissionKind  emissionKind,
MlirLLVMDINameTableKind  nameTableKind 
)

Creates a LLVM DICompileUnit attribute.

Definition at line 206 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDICompositeTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompositeTypeAttrGet ( MlirContext  ctx,
unsigned int  tag,
MlirAttribute  recId,
MlirAttribute  name,
MlirAttribute  file,
uint32_t  line,
MlirAttribute  scope,
MlirAttribute  baseType,
int64_t  flags,
uint64_t  sizeInBits,
uint64_t  alignInBits,
intptr_t  nElements,
MlirAttribute const *  elements 
)

Creates a LLVM DICompositeType attribute.

Definition at line 154 of file LLVM.cpp.

References mlir::Attribute::cast(), mlir::get(), unwrap(), unwrapList(), and wrap().

◆ mlirLLVMDIDerivedTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGet ( MlirContext  ctx,
unsigned int  tag,
MlirAttribute  name,
MlirAttribute  baseType,
uint64_t  sizeInBits,
uint32_t  alignInBits,
uint64_t  offsetInBits,
MlirAttribute  extraData 
)

Creates a LLVM DIDerivedType attribute.

Definition at line 172 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIDerivedTypeAttrGetBaseType()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGetBaseType ( MlirAttribute  diDerivedType)

Gets the base type from a LLVM DIDerivedType attribute.

Definition at line 183 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDIExpressionAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionAttrGet ( MlirContext  ctx,
intptr_t  nOperations,
MlirAttribute const *  operations 
)

Creates a LLVM DIExpression attribute.

Definition at line 129 of file LLVM.cpp.

References mlir::Attribute::cast(), mlir::get(), unwrap(), unwrapList(), and wrap().

◆ mlirLLVMDIExpressionElemAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionElemAttrGet ( MlirContext  ctx,
unsigned int  opcode,
intptr_t  nArguments,
uint64_t const *  arguments 
)

Creates a LLVM DIExpressionElem attribute.

Definition at line 121 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIFileAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet ( MlirContext  ctx,
MlirAttribute  name,
MlirAttribute  directory 
)

Creates a LLVM DIFileAttr attribute.

Definition at line 199 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIFlagsAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet ( MlirContext  ctx,
uint64_t  value 
)

Creates a LLVM DIFlags attribute.

Definition at line 218 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDILexicalBlockAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockAttrGet ( MlirContext  ctx,
MlirAttribute  scope,
MlirAttribute  file,
unsigned int  line,
unsigned int  column 
)

Creates a LLVM DILexicalBlock attribute.

Definition at line 222 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDILexicalBlockFileAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockFileAttrGet ( MlirContext  ctx,
MlirAttribute  scope,
MlirAttribute  file,
unsigned int  discriminator 
)

Creates a LLVM DILexicalBlockFile attribute.

Definition at line 232 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDILocalVariableAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILocalVariableAttrGet ( MlirContext  ctx,
MlirAttribute  scope,
MlirAttribute  name,
MlirAttribute  diFile,
unsigned int  line,
unsigned int  arg,
unsigned int  alignInBits,
MlirAttribute  diType 
)

Creates a LLVM DILocalVariableAttr attribute.

Definition at line 242 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIModuleAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGet ( MlirContext  ctx,
MlirAttribute  file,
MlirAttribute  scope,
MlirAttribute  name,
MlirAttribute  configMacros,
MlirAttribute  includePath,
MlirAttribute  apinotes,
unsigned int  line,
bool  isDecl 
)

Creates a LLVM DIModuleAttr attribute.

Definition at line 304 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDIModuleAttrGetScope()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGetScope ( MlirAttribute  diModule)

Gets the scope of this DIModuleAttr.

Definition at line 318 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDINullTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet ( MlirContext  ctx)

Creates a LLVM DINullType attribute.

Definition at line 141 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDISubprogramAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGet ( MlirContext  ctx,
MlirAttribute  id,
MlirAttribute  compileUnit,
MlirAttribute  scope,
MlirAttribute  name,
MlirAttribute  linkageName,
MlirAttribute  file,
unsigned int  line,
unsigned int  scopeLine,
uint64_t  subprogramFlags,
MlirAttribute  type 
)

Creates a LLVM DISubprogramAttr attribute.

Definition at line 265 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMDISubprogramAttrGetCompileUnit()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetCompileUnit ( MlirAttribute  diSubprogram)

Gets the compile unit from this DISubprogram.

Definition at line 292 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDISubprogramAttrGetFile()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetFile ( MlirAttribute  diSubprogram)

Gets the file from this DISubprogramAttr.

Definition at line 296 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDISubprogramAttrGetLine()

MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetLine ( MlirAttribute  diSubprogram)

Gets the line from this DISubprogramAttr.

Definition at line 283 of file LLVM.cpp.

References unwrap().

◆ mlirLLVMDISubprogramAttrGetScope()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetScope ( MlirAttribute  diSubprogram)

Gets the scope from this DISubprogramAttr.

Definition at line 279 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDISubprogramAttrGetScopeLine()

MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetScopeLine ( MlirAttribute  diSubprogram)

Gets the scope line from this DISubprogram.

Definition at line 287 of file LLVM.cpp.

References unwrap().

◆ mlirLLVMDISubprogramAttrGetType()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetType ( MlirAttribute  diSubprogram)

Gets the type from this DISubprogramAttr.

Definition at line 300 of file LLVM.cpp.

References unwrap(), and wrap().

◆ mlirLLVMDISubroutineTypeAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubroutineTypeAttrGet ( MlirContext  ctx,
unsigned int  callingConvention,
intptr_t  nTypes,
MlirAttribute const *  types 
)

Creates a LLVM DISubroutineTypeAttr attribute.

Definition at line 252 of file LLVM.cpp.

References mlir::Attribute::cast(), mlir::get(), unwrap(), unwrapList(), and wrap().

◆ mlirLLVMFunctionTypeGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGet ( MlirType  resultType,
intptr_t  nArgumentTypes,
MlirType const *  argumentTypes,
bool  isVarArg 
)

Creates an llvm.func type.

Definition at line 38 of file LLVM.cpp.

References mlir::get(), unwrap(), unwrapList(), and wrap().

◆ mlirLLVMLinkageAttrGet()

MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMLinkageAttrGet ( MlirContext  ctx,
MlirLLVMLinkage  linkage 
)

Creates a LLVM Linkage attribute.

Definition at line 195 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMPointerTypeGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet ( MlirContext  ctx,
unsigned  addressSpace 
)

Creates an llvm.ptr type.

Definition at line 26 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirLLVMStructTypeGetElementType()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeGetElementType ( MlirType  type,
intptr_t  position 
)

Returns the positions-th field of the struct.

Asserts if the struct is opaque, not yet initialized or if the position is out of range.

Definition at line 58 of file LLVM.cpp.

References unwrap(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeGetIdentifier()

MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetIdentifier ( MlirType  type)

Returns the identifier of the identified struct.

Asserts that the struct is identified, i.e., not literal.

Definition at line 66 of file LLVM.cpp.

References unwrap(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeGetNumElementTypes()

MLIR_CAPI_EXPORTED intptr_t mlirLLVMStructTypeGetNumElementTypes ( MlirType  type)

Returns the number of fields in the struct.

Asserts if the struct is opaque or not yet initialized.

Definition at line 54 of file LLVM.cpp.

References unwrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeIdentifiedGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedGet ( MlirContext  ctx,
MlirStringRef  name 
)

Creates an LLVM identified struct type with no body.

If a struct type with this name already exists in the context, returns that type. Use mlirLLVMStructTypeIdentifiedNewGet to create a fresh struct type, potentially renaming it. The body should be set separatelty by calling mlirLLVMStructTypeSetBody, if it isn't set already.

Definition at line 97 of file LLVM.cpp.

References mlir::LLVM::LLVMStructType::getIdentified(), unwrap(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeIdentifiedNewGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedNewGet ( MlirContext  ctx,
MlirStringRef  name,
intptr_t  nFieldTypes,
MlirType const *  fieldTypes,
bool  isPacked 
)

Creates an LLVM identified struct type with no body and a name starting with the given prefix.

If a struct with the exact name as the given prefix already exists, appends an unspecified suffix to the name so that the name is unique in context.

Definition at line 101 of file LLVM.cpp.

References mlir::LLVM::LLVMStructType::getNewIdentified(), unwrap(), unwrapList(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeIsLiteral()

MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsLiteral ( MlirType  type)

Returns true if the type is a literal (unnamed) LLVM struct type.

Definition at line 50 of file LLVM.cpp.

References unwrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeIsOpaque()

MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsOpaque ( MlirType  type)

Returns true is the struct is explicitly opaque (will not have a body) or uninitialized (will eventually have a body).

Definition at line 70 of file LLVM.cpp.

References unwrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeIsPacked()

MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsPacked ( MlirType  type)

Returns true if the struct is packed.

Definition at line 62 of file LLVM.cpp.

References unwrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeLiteralGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGet ( MlirContext  ctx,
intptr_t  nFieldTypes,
MlirType const *  fieldTypes,
bool  isPacked 
)

Creates an LLVM literal (unnamed) struct type.

This may assert if the fields have types not compatible with the LLVM dialect. For a graceful failure, use the checked version.

Definition at line 74 of file LLVM.cpp.

References mlir::LLVM::LLVMStructType::getLiteral(), unwrap(), unwrapList(), and wrap().

◆ mlirLLVMStructTypeLiteralGetChecked()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGetChecked ( MlirLocation  loc,
intptr_t  nFieldTypes,
MlirType const *  fieldTypes,
bool  isPacked 
)

Creates an LLVM literal (unnamed) struct type if possible.

Emits a diagnostic at the given location and returns null otherwise.

Definition at line 83 of file LLVM.cpp.

References mlir::emitError(), mlir::LLVM::LLVMStructType::getLiteralChecked(), unwrap(), unwrapList(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeOpaqueGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet ( MlirContext  ctx,
MlirStringRef  name 
)

Definition at line 93 of file LLVM.cpp.

References mlir::LLVM::LLVMStructType::getOpaque(), unwrap(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMStructTypeSetBody()

MLIR_CAPI_EXPORTED MlirLogicalResult mlirLLVMStructTypeSetBody ( MlirType  structType,
intptr_t  nFieldTypes,
MlirType const *  fieldTypes,
bool  isPacked 
)

Sets the body of the identified struct if it hasn't been set yet.

Returns whether the operation was successful.

Definition at line 111 of file LLVM.cpp.

References unwrap(), unwrapList(), and wrap().

Referenced by populateDialectLLVMSubmodule().

◆ mlirLLVMVoidTypeGet()

MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet ( MlirContext  ctx)

Creates an llmv.void type.

Definition at line 30 of file LLVM.cpp.

References mlir::get(), unwrap(), and wrap().

◆ mlirTypeIsALLVMStructType()

MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMStructType ( MlirType  type)

Returns true if the type is an LLVM dialect struct type.

Definition at line 46 of file LLVM.cpp.

References unwrap().

Referenced by populateDialectLLVMSubmodule().