MLIR  19.0.0git
LLVM.h
Go to the documentation of this file.
1 //===-- mlir-c/Dialect/LLVM.h - C API for LLVM --------------------*- C -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM
4 // Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef MLIR_C_DIALECT_LLVM_H
11 #define MLIR_C_DIALECT_LLVM_H
12 
13 #include "mlir-c/IR.h"
14 #include "mlir-c/Support.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
21 
22 /// Creates an llvm.ptr type.
23 MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirContext ctx,
24  unsigned addressSpace);
25 
26 /// Returns `true` if the type is an LLVM dialect pointer type.
28 
29 /// Returns address space of llvm.ptr
30 MLIR_CAPI_EXPORTED unsigned
31 mlirLLVMPointerTypeGetAddressSpace(MlirType pointerType);
32 
33 /// Creates an llmv.void type.
34 MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet(MlirContext ctx);
35 
36 /// Creates an llvm.array type.
37 MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType,
38  unsigned numElements);
39 
40 /// Creates an llvm.func type.
41 MLIR_CAPI_EXPORTED MlirType
42 mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes,
43  MlirType const *argumentTypes, bool isVarArg);
44 
45 /// Returns `true` if the type is an LLVM dialect struct type.
47 
48 /// Returns `true` if the type is a literal (unnamed) LLVM struct type.
50 
51 /// Returns the number of fields in the struct. Asserts if the struct is opaque
52 /// or not yet initialized.
54 
55 /// Returns the `positions`-th field of the struct. Asserts if the struct is
56 /// opaque, not yet initialized or if the position is out of range.
58  intptr_t position);
59 
60 /// Returns `true` if the struct is packed.
62 
63 /// Returns the identifier of the identified struct. Asserts that the struct is
64 /// identified, i.e., not literal.
66 
67 /// Returns `true` is the struct is explicitly opaque (will not have a body) or
68 /// uninitialized (will eventually have a body).
70 
71 /// Creates an LLVM literal (unnamed) struct type. This may assert if the fields
72 /// have types not compatible with the LLVM dialect. For a graceful failure, use
73 /// the checked version.
74 MLIR_CAPI_EXPORTED MlirType
75 mlirLLVMStructTypeLiteralGet(MlirContext ctx, intptr_t nFieldTypes,
76  MlirType const *fieldTypes, bool isPacked);
77 
78 /// Creates an LLVM literal (unnamed) struct type if possible. Emits a
79 /// diagnostic at the given location and returns null otherwise.
80 MLIR_CAPI_EXPORTED MlirType
81 mlirLLVMStructTypeLiteralGetChecked(MlirLocation loc, intptr_t nFieldTypes,
82  MlirType const *fieldTypes, bool isPacked);
83 
84 /// Creates an LLVM identified struct type with no body. If a struct type with
85 /// this name already exists in the context, returns that type. Use
86 /// mlirLLVMStructTypeIdentifiedNewGet to create a fresh struct type,
87 /// potentially renaming it. The body should be set separatelty by calling
88 /// mlirLLVMStructTypeSetBody, if it isn't set already.
90  MlirStringRef name);
91 
92 /// Creates an LLVM identified struct type with no body and a name starting with
93 /// the given prefix. If a struct with the exact name as the given prefix
94 /// already exists, appends an unspecified suffix to the name so that the name
95 /// is unique in context.
97  MlirContext ctx, MlirStringRef name, intptr_t nFieldTypes,
98  MlirType const *fieldTypes, bool isPacked);
99 
100 MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet(MlirContext ctx,
101  MlirStringRef name);
102 
103 /// Sets the body of the identified struct if it hasn't been set yet. Returns
104 /// whether the operation was successful.
106 mlirLLVMStructTypeSetBody(MlirType structType, intptr_t nFieldTypes,
107  MlirType const *fieldTypes, bool isPacked);
108 
157 };
158 typedef enum MlirLLVMCConv MlirLLVMCConv;
159 
160 /// Creates a LLVM CConv attribute.
161 MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet(MlirContext ctx,
162  MlirLLVMCConv cconv);
163 
170 };
171 typedef enum MlirLLVMComdat MlirLLVMComdat;
172 
173 /// Creates a LLVM Comdat attribute.
174 MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet(MlirContext ctx,
175  MlirLLVMComdat comdat);
176 
189 };
190 typedef enum MlirLLVMLinkage MlirLLVMLinkage;
191 
192 /// Creates a LLVM Linkage attribute.
193 MLIR_CAPI_EXPORTED MlirAttribute
194 mlirLLVMLinkageAttrGet(MlirContext ctx, MlirLLVMLinkage linkage);
195 
196 /// Creates a LLVM DINullType attribute.
197 MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet(MlirContext ctx);
198 
199 /// Creates a LLVM DIExpressionElem attribute.
200 MLIR_CAPI_EXPORTED MlirAttribute
201 mlirLLVMDIExpressionElemAttrGet(MlirContext ctx, unsigned int opcode,
202  intptr_t nArguments, uint64_t const *arguments);
203 
204 /// Creates a LLVM DIExpression attribute.
206  MlirContext ctx, intptr_t nOperations, MlirAttribute const *operations);
207 
229 };
231 
232 /// Creates a LLVM DIBasicType attribute.
234  MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits,
235  MlirLLVMTypeEncoding encoding);
236 
237 /// Creates a LLVM DICompositeType attribute.
239  MlirContext ctx, unsigned int tag, MlirAttribute recId, MlirAttribute name,
240  MlirAttribute file, uint32_t line, MlirAttribute scope,
241  MlirAttribute baseType, int64_t flags, uint64_t sizeInBits,
242  uint64_t alignInBits, intptr_t nElements, MlirAttribute const *elements);
243 
244 /// Creates a LLVM DIDerivedType attribute. Note that `dwarfAddressSpace` is an
245 /// optional field, where `MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL` indicates null
246 /// and non-negative values indicate a value present.
248  MlirContext ctx, unsigned int tag, MlirAttribute name,
249  MlirAttribute baseType, uint64_t sizeInBits, uint32_t alignInBits,
250  uint64_t offsetInBits, int64_t dwarfAddressSpace, MlirAttribute extraData);
251 
252 /// Constant to represent std::nullopt for dwarfAddressSpace to omit the field.
253 #define MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL -1
254 
255 /// Gets the base type from a LLVM DIDerivedType attribute.
256 MLIR_CAPI_EXPORTED MlirAttribute
257 mlirLLVMDIDerivedTypeAttrGetBaseType(MlirAttribute diDerivedType);
258 
259 /// Creates a LLVM DIFileAttr attribute.
260 MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet(MlirContext ctx,
261  MlirAttribute name,
262  MlirAttribute directory);
263 
269 };
271 
277 };
279 
280 /// Creates a LLVM DICompileUnit attribute.
282  MlirContext ctx, MlirAttribute id, unsigned int sourceLanguage,
283  MlirAttribute file, MlirAttribute producer, bool isOptimized,
284  MlirLLVMDIEmissionKind emissionKind, MlirLLVMDINameTableKind nameTableKind);
285 
286 /// Creates a LLVM DIFlags attribute.
287 MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet(MlirContext ctx,
288  uint64_t value);
289 
290 /// Creates a LLVM DILexicalBlock attribute.
292  MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int line,
293  unsigned int column);
294 
295 /// Creates a LLVM DILexicalBlockFile attribute.
297  MlirContext ctx, MlirAttribute scope, MlirAttribute file,
298  unsigned int discriminator);
299 
300 /// Creates a LLVM DILocalVariableAttr attribute.
302  MlirContext ctx, MlirAttribute scope, MlirAttribute name,
303  MlirAttribute diFile, unsigned int line, unsigned int arg,
304  unsigned int alignInBits, MlirAttribute diType);
305 
306 /// Creates a LLVM DISubprogramAttr attribute.
308  MlirContext ctx, MlirAttribute id, MlirAttribute compileUnit,
309  MlirAttribute scope, MlirAttribute name, MlirAttribute linkageName,
310  MlirAttribute file, unsigned int line, unsigned int scopeLine,
311  uint64_t subprogramFlags, MlirAttribute type);
312 
313 /// Gets the scope from this DISubprogramAttr.
314 MLIR_CAPI_EXPORTED MlirAttribute
315 mlirLLVMDISubprogramAttrGetScope(MlirAttribute diSubprogram);
316 
317 /// Gets the line from this DISubprogramAttr.
318 MLIR_CAPI_EXPORTED unsigned int
319 mlirLLVMDISubprogramAttrGetLine(MlirAttribute diSubprogram);
320 
321 /// Gets the scope line from this DISubprogram.
322 MLIR_CAPI_EXPORTED unsigned int
323 mlirLLVMDISubprogramAttrGetScopeLine(MlirAttribute diSubprogram);
324 
325 /// Gets the compile unit from this DISubprogram.
326 MLIR_CAPI_EXPORTED MlirAttribute
327 mlirLLVMDISubprogramAttrGetCompileUnit(MlirAttribute diSubprogram);
328 
329 /// Gets the file from this DISubprogramAttr.
330 MLIR_CAPI_EXPORTED MlirAttribute
331 mlirLLVMDISubprogramAttrGetFile(MlirAttribute diSubprogram);
332 
333 /// Gets the type from this DISubprogramAttr.
334 MLIR_CAPI_EXPORTED MlirAttribute
335 mlirLLVMDISubprogramAttrGetType(MlirAttribute diSubprogram);
336 
337 /// Creates a LLVM DISubroutineTypeAttr attribute.
338 MLIR_CAPI_EXPORTED MlirAttribute
339 mlirLLVMDISubroutineTypeAttrGet(MlirContext ctx, unsigned int callingConvention,
340  intptr_t nTypes, MlirAttribute const *types);
341 
342 /// Creates a LLVM DIModuleAttr attribute.
344  MlirContext ctx, MlirAttribute file, MlirAttribute scope,
345  MlirAttribute name, MlirAttribute configMacros, MlirAttribute includePath,
346  MlirAttribute apinotes, unsigned int line, bool isDecl);
347 
348 /// Gets the scope of this DIModuleAttr.
349 MLIR_CAPI_EXPORTED MlirAttribute
350 mlirLLVMDIModuleAttrGetScope(MlirAttribute diModule);
351 
352 #ifdef __cplusplus
353 }
354 #endif
355 
356 #endif // MLIR_C_DIALECT_LLVM_H
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: LLVM.cpp:162
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetScopeLine(MlirAttribute diSubprogram)
Gets the scope line from this DISubprogram.
Definition: LLVM.cpp:297
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.
Definition: LLVM.cpp:109
MlirLLVMDINameTableKind
Definition: LLVM.h:272
@ MlirLLVMDINameTableKindNone
Definition: LLVM.h:275
@ MlirLLVMDINameTableKindApple
Definition: LLVM.h:276
@ MlirLLVMDINameTableKindDefault
Definition: LLVM.h:273
@ MlirLLVMDINameTableKindGNU
Definition: LLVM.h:274
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedGet(MlirContext ctx, MlirStringRef name)
Creates an LLVM identified struct type with no body.
Definition: LLVM.cpp:105
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMPointerType(MlirType type)
Returns true if the type is an LLVM dialect pointer type.
Definition: LLVM.cpp:30
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.
Definition: LLVM.cpp:119
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGet(MlirContext ctx, unsigned int tag, MlirAttribute name, MlirAttribute baseType, uint64_t sizeInBits, uint32_t alignInBits, uint64_t offsetInBits, int64_t dwarfAddressSpace, MlirAttribute extraData)
Creates a LLVM DIDerivedType attribute.
Definition: LLVM.cpp:179
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: LLVM.cpp:252
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet(MlirContext ctx, MlirLLVMCConv cconv)
Creates a LLVM CConv attribute.
Definition: LLVM.cpp:197
MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirContext ctx, unsigned addressSpace)
Creates an llvm.ptr type.
Definition: LLVM.cpp:26
MlirLLVMLinkage
Definition: LLVM.h:177
@ MlirLLVMLinkageExternal
Definition: LLVM.h:188
@ MlirLLVMLinkageLinkonce
Definition: LLVM.h:181
@ MlirLLVMLinkageExternWeak
Definition: LLVM.h:185
@ MlirLLVMLinkageWeakODR
Definition: LLVM.h:187
@ MlirLLVMLinkageCommon
Definition: LLVM.h:183
@ MlirLLVMLinkageWeak
Definition: LLVM.h:182
@ MlirLLVMLinkageAppending
Definition: LLVM.h:184
@ MlirLLVMLinkageAvailableExternally
Definition: LLVM.h:180
@ MlirLLVMLinkageLinkonceODR
Definition: LLVM.h:186
@ MlirLLVMLinkageInternal
Definition: LLVM.h:179
@ MlirLLVMLinkagePrivate
Definition: LLVM.h:178
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsLiteral(MlirType type)
Returns true if the type is a literal (unnamed) LLVM struct type.
Definition: LLVM.cpp:58
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType, unsigned numElements)
Creates an llvm.array type.
Definition: LLVM.cpp:42
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMLinkageAttrGet(MlirContext ctx, MlirLLVMLinkage linkage)
Creates a LLVM Linkage attribute.
Definition: LLVM.cpp:205
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetIdentifier(MlirType type)
Returns the identifier of the identified struct.
Definition: LLVM.cpp:74
MlirLLVMComdat
Definition: LLVM.h:164
@ MlirLLVMComdatSameSize
Definition: LLVM.h:169
@ MlirLLVMComdatExactMatch
Definition: LLVM.h:166
@ MlirLLVMComdatNoDeduplicate
Definition: LLVM.h:168
@ MlirLLVMComdatAny
Definition: LLVM.h:165
@ MlirLLVMComdatLargest
Definition: LLVM.h:167
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsOpaque(MlirType type)
Returns true is the struct is explicitly opaque (will not have a body) or uninitialized (will eventua...
Definition: LLVM.cpp:78
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsPacked(MlirType type)
Returns true if the struct is packed.
Definition: LLVM.cpp:70
MLIR_CAPI_EXPORTED intptr_t mlirLLVMStructTypeGetNumElementTypes(MlirType type)
Returns the number of fields in the struct.
Definition: LLVM.cpp:62
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionAttrGet(MlirContext ctx, intptr_t nOperations, MlirAttribute const *operations)
Creates a LLVM DIExpression attribute.
Definition: LLVM.cpp:137
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetScope(MlirAttribute diSubprogram)
Gets the scope from this DISubprogramAttr.
Definition: LLVM.cpp:289
MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet(MlirContext ctx)
Creates an llmv.void type.
Definition: LLVM.cpp:38
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubroutineTypeAttrGet(MlirContext ctx, unsigned int callingConvention, intptr_t nTypes, MlirAttribute const *types)
Creates a LLVM DISubroutineTypeAttr attribute.
Definition: LLVM.cpp:262
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetFile(MlirAttribute diSubprogram)
Gets the file from this DISubprogramAttr.
Definition: LLVM.cpp:306
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeGetElementType(MlirType type, intptr_t position)
Returns the positions-th field of the struct.
Definition: LLVM.cpp:66
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: LLVM.cpp:275
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockFileAttrGet(MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int discriminator)
Creates a LLVM DILexicalBlockFile attribute.
Definition: LLVM.cpp:242
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIBasicTypeAttrGet(MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits, MlirLLVMTypeEncoding encoding)
Creates a LLVM DIBasicType attribute.
Definition: LLVM.cpp:153
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet(MlirContext ctx, MlirAttribute name, MlirAttribute directory)
Creates a LLVM DIFileAttr attribute.
Definition: LLVM.cpp:209
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet(MlirContext ctx, MlirLLVMComdat comdat)
Creates a LLVM Comdat attribute.
Definition: LLVM.cpp:201
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(LLVM, llvm)
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGetScope(MlirAttribute diModule)
Gets the scope of this DIModuleAttr.
Definition: LLVM.cpp:328
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet(MlirContext ctx, MlirStringRef name)
Definition: LLVM.cpp:101
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes, MlirType const *argumentTypes, bool isVarArg)
Creates an llvm.func type.
Definition: LLVM.cpp:46
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet(MlirContext ctx, uint64_t value)
Creates a LLVM DIFlags attribute.
Definition: LLVM.cpp:228
MlirLLVMCConv
Definition: LLVM.h:109
@ MlirLLVMCConvPTX_Device
Definition: LLVM.h:131
@ MlirLLVMCConvWASM_EmscriptenInvoke
Definition: LLVM.h:154
@ MlirLLVMCConvX86_VectorCall
Definition: LLVM.h:137
@ MlirLLVMCConvARM_AAPCS_VFP
Definition: LLVM.h:127
@ MlirLLVMCConvMSP430_BUILTIN
Definition: LLVM.h:149
@ MlirLLVMCConvX86_FastCall
Definition: LLVM.h:124
@ MlirLLVMCConvHiPE
Definition: LLVM.h:114
@ MlirLLVMCConvAMDGPU_HS
Definition: LLVM.h:148
@ MlirLLVMCConvPreserveMost
Definition: LLVM.h:116
@ MlirLLVMCConvX86_ThisCall
Definition: LLVM.h:129
@ MlirLLVMCConvPTX_Kernel
Definition: LLVM.h:130
@ MlirLLVMCConvAMDGPU_KERNEL
Definition: LLVM.h:146
@ MlirLLVMCConvCFGuard_Check
Definition: LLVM.h:121
@ MlirLLVMCConvAMDGPU_ES
Definition: LLVM.h:151
@ MlirLLVMCConvSPIR_FUNC
Definition: LLVM.h:132
@ MlirLLVMCConvAMDGPU_LS
Definition: LLVM.h:150
@ MlirLLVMCConvDUMMY_HHVM_C
Definition: LLVM.h:139
@ MlirLLVMCConvCold
Definition: LLVM.h:112
@ MlirLLVMCConvWin64
Definition: LLVM.h:136
@ MlirLLVMCConvX86_INTR
Definition: LLVM.h:140
@ MlirLLVMCConvAnyReg
Definition: LLVM.h:115
@ MlirLLVMCConvDUMMY_HHVM
Definition: LLVM.h:138
@ MlirLLVMCConvTail
Definition: LLVM.h:120
@ MlirLLVMCConvCXX_FAST_TLS
Definition: LLVM.h:119
@ MlirLLVMCConvAVR_INTR
Definition: LLVM.h:141
@ MlirLLVMCConvSwift
Definition: LLVM.h:118
@ MlirLLVMCConvPreserveAll
Definition: LLVM.h:117
@ MlirLLVMCConvFast
Definition: LLVM.h:111
@ MlirLLVMCConvC
Definition: LLVM.h:110
@ MlirLLVMCConvAMDGPU_Gfx
Definition: LLVM.h:155
@ MlirLLVMCConvX86_RegCall
Definition: LLVM.h:147
@ MlirLLVMCConvAMDGPU_VS
Definition: LLVM.h:143
@ MlirLLVMCConvAArch64_VectorCall
Definition: LLVM.h:152
@ MlirLLVMCConvAMDGPU_CS
Definition: LLVM.h:145
@ MlirLLVMCConvGHC
Definition: LLVM.h:113
@ MlirLLVMCConvAArch64_SVE_VectorCall
Definition: LLVM.h:153
@ MlirLLVMCConvX86_StdCall
Definition: LLVM.h:123
@ MlirLLVMCConvAMDGPU_GS
Definition: LLVM.h:144
@ MlirLLVMCConvMSP430_INTR
Definition: LLVM.h:128
@ MlirLLVMCConvM68k_INTR
Definition: LLVM.h:156
@ MlirLLVMCConvARM_AAPCS
Definition: LLVM.h:126
@ MlirLLVMCConvAVR_BUILTIN
Definition: LLVM.h:142
@ MlirLLVMCConvX86_64_SysV
Definition: LLVM.h:135
@ MlirLLVMCConvSPIR_KERNEL
Definition: LLVM.h:133
@ MlirLLVMCConvSwiftTail
Definition: LLVM.h:122
@ MlirLLVMCConvIntel_OCL_BI
Definition: LLVM.h:134
@ MlirLLVMCConvARM_APCS
Definition: LLVM.h:125
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGet(MlirContext ctx, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Creates an LLVM literal (unnamed) struct type.
Definition: LLVM.cpp:82
MlirLLVMDIEmissionKind
Definition: LLVM.h:264
@ MlirLLVMDIEmissionKindLineTablesOnly
Definition: LLVM.h:267
@ MlirLLVMDIEmissionKindFull
Definition: LLVM.h:266
@ MlirLLVMDIEmissionKindNone
Definition: LLVM.h:265
@ MlirLLVMDIEmissionKindDebugDirectivesOnly
Definition: LLVM.h:268
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGetBaseType(MlirAttribute diDerivedType)
Gets the base type from a LLVM DIDerivedType attribute.
Definition: LLVM.cpp:193
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockAttrGet(MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int line, unsigned int column)
Creates a LLVM DILexicalBlock attribute.
Definition: LLVM.cpp:232
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMStructType(MlirType type)
Returns true if the type is an LLVM dialect struct type.
Definition: LLVM.cpp:54
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionElemAttrGet(MlirContext ctx, unsigned int opcode, intptr_t nArguments, uint64_t const *arguments)
Creates a LLVM DIExpressionElem attribute.
Definition: LLVM.cpp:129
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: LLVM.cpp:216
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetCompileUnit(MlirAttribute diSubprogram)
Gets the compile unit from this DISubprogram.
Definition: LLVM.cpp:302
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeLiteralGetChecked(MlirLocation loc, intptr_t nFieldTypes, MlirType const *fieldTypes, bool isPacked)
Creates an LLVM literal (unnamed) struct type if possible.
Definition: LLVM.cpp:91
MlirLLVMTypeEncoding
Definition: LLVM.h:208
@ MlirLLVMTypeEncodingComplexFloat
Definition: LLVM.h:211
@ MlirLLVMTypeEncodingDecimalFloat
Definition: LLVM.h:223
@ MlirLLVMTypeEncodingLoUser
Definition: LLVM.h:227
@ MlirLLVMTypeEncodingUnsigned
Definition: LLVM.h:215
@ MlirLLVMTypeEncodingSignedFixed
Definition: LLVM.h:221
@ MlirLLVMTypeEncodingASCII
Definition: LLVM.h:226
@ MlirLLVMTypeEncodingUTF
Definition: LLVM.h:224
@ MlirLLVMTypeEncodingBoolean
Definition: LLVM.h:210
@ MlirLLVMTypeEncodingPackedDecimal
Definition: LLVM.h:218
@ MlirLLVMTypeEncodingHiUser
Definition: LLVM.h:228
@ MlirLLVMTypeEncodingAddress
Definition: LLVM.h:209
@ MlirLLVMTypeEncodingImaginaryFloat
Definition: LLVM.h:217
@ MlirLLVMTypeEncodingUnsignedChar
Definition: LLVM.h:216
@ MlirLLVMTypeEncodingUCS
Definition: LLVM.h:225
@ MlirLLVMTypeEncodingNumericString
Definition: LLVM.h:219
@ MlirLLVMTypeEncodingSignedChar
Definition: LLVM.h:214
@ MlirLLVMTypeEncodingEdited
Definition: LLVM.h:220
@ MlirLLVMTypeEncodingUnsignedFixed
Definition: LLVM.h:222
@ MlirLLVMTypeEncodingSigned
Definition: LLVM.h:213
@ MlirLLVMTypeEncodingFloatT
Definition: LLVM.h:212
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet(MlirContext ctx)
Creates a LLVM DINullType attribute.
Definition: LLVM.cpp:149
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetLine(MlirAttribute diSubprogram)
Gets the line from this DISubprogramAttr.
Definition: LLVM.cpp:293
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetType(MlirAttribute diSubprogram)
Gets the type from this DISubprogramAttr.
Definition: LLVM.cpp:310
MLIR_CAPI_EXPORTED unsigned mlirLLVMPointerTypeGetAddressSpace(MlirType pointerType)
Returns address space of llvm.ptr.
Definition: LLVM.cpp:34
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: LLVM.cpp:314
#define MLIR_CAPI_EXPORTED
Definition: Support.h:46
Include the generated interface declarations.
Definition: CallGraph.h:229
A logical result value, essentially a boolean with named states.
Definition: Support.h:116
A pointer to a sized fragment of a string, not necessarily null-terminated.
Definition: Support.h:73