MLIR 22.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
17extern "C" {
18#endif
19
21
22/// Creates an llvm.ptr type.
23MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirContext ctx,
24 unsigned addressSpace);
25
27
28/// Returns `true` if the type is an LLVM dialect pointer type.
30
31/// Returns address space of llvm.ptr
32MLIR_CAPI_EXPORTED unsigned
33mlirLLVMPointerTypeGetAddressSpace(MlirType pointerType);
34
35/// Creates an llmv.void type.
36MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet(MlirContext ctx);
37
38/// Creates an llvm.array type.
39MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType,
40 unsigned numElements);
41
42/// Returns the element type of the llvm.array type.
44
45/// Creates an llvm.func type.
46MLIR_CAPI_EXPORTED MlirType
47mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes,
48 MlirType const *argumentTypes, bool isVarArg);
49
50/// Returns the number of input types.
52
53/// Returns the pos-th input type.
55 intptr_t pos);
56
57/// Returns the return type of the function type.
59
60/// Returns `true` if the type is an LLVM dialect struct type.
62
64
65/// Returns `true` if the type is a literal (unnamed) LLVM struct type.
67
68/// Returns the number of fields in the struct. Asserts if the struct is opaque
69/// or not yet initialized.
71
72/// Returns the `positions`-th field of the struct. Asserts if the struct is
73/// opaque, not yet initialized or if the position is out of range.
75 intptr_t position);
76
77/// Returns `true` if the struct is packed.
79
80/// Returns the identifier of the identified struct. Asserts that the struct is
81/// identified, i.e., not literal.
83
84/// Returns `true` is the struct is explicitly opaque (will not have a body) or
85/// uninitialized (will eventually have a body).
87
88/// Creates an LLVM literal (unnamed) struct type. This may assert if the fields
89/// have types not compatible with the LLVM dialect. For a graceful failure, use
90/// the checked version.
91MLIR_CAPI_EXPORTED MlirType
92mlirLLVMStructTypeLiteralGet(MlirContext ctx, intptr_t nFieldTypes,
93 MlirType const *fieldTypes, bool isPacked);
94
95/// Creates an LLVM literal (unnamed) struct type if possible. Emits a
96/// diagnostic at the given location and returns null otherwise.
97MLIR_CAPI_EXPORTED MlirType
98mlirLLVMStructTypeLiteralGetChecked(MlirLocation loc, intptr_t nFieldTypes,
99 MlirType const *fieldTypes, bool isPacked);
100
101/// Creates an LLVM identified struct type with no body. If a struct type with
102/// this name already exists in the context, returns that type. Use
103/// mlirLLVMStructTypeIdentifiedNewGet to create a fresh struct type,
104/// potentially renaming it. The body should be set separatelty by calling
105/// mlirLLVMStructTypeSetBody, if it isn't set already.
107 MlirStringRef name);
108
109/// Creates an LLVM identified struct type with no body and a name starting with
110/// the given prefix. If a struct with the exact name as the given prefix
111/// already exists, appends an unspecified suffix to the name so that the name
112/// is unique in context.
114 MlirContext ctx, MlirStringRef name, intptr_t nFieldTypes,
115 MlirType const *fieldTypes, bool isPacked);
116
117MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet(MlirContext ctx,
118 MlirStringRef name);
119
120/// Sets the body of the identified struct if it hasn't been set yet. Returns
121/// whether the operation was successful.
123mlirLLVMStructTypeSetBody(MlirType structType, intptr_t nFieldTypes,
124 MlirType const *fieldTypes, bool isPacked);
125
174};
176
177/// Creates a LLVM CConv attribute.
178MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet(MlirContext ctx,
179 MlirLLVMCConv cconv);
180
189
190/// Creates a LLVM Comdat attribute.
191MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet(MlirContext ctx,
192 MlirLLVMComdat comdat);
193
208
209/// Creates a LLVM Linkage attribute.
210MLIR_CAPI_EXPORTED MlirAttribute
211mlirLLVMLinkageAttrGet(MlirContext ctx, MlirLLVMLinkage linkage);
212
213/// Creates a LLVM DINullType attribute.
214MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet(MlirContext ctx);
215
216/// Creates a LLVM DIExpressionElem attribute.
217MLIR_CAPI_EXPORTED MlirAttribute
218mlirLLVMDIExpressionElemAttrGet(MlirContext ctx, unsigned int opcode,
219 intptr_t nArguments, uint64_t const *arguments);
220
221/// Creates a LLVM DIExpression attribute.
223 MlirContext ctx, intptr_t nOperations, MlirAttribute const *operations);
224
248
249/// Creates a LLVM DIBasicType attribute.
251 MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits,
252 MlirLLVMTypeEncoding encoding);
253
254/// Creates a self-referencing LLVM DICompositeType attribute.
255MLIR_CAPI_EXPORTED MlirAttribute
256mlirLLVMDICompositeTypeAttrGetRecSelf(MlirAttribute recId);
257
258/// Creates a LLVM DICompositeType attribute.
260 MlirContext ctx, MlirAttribute recId, bool isRecSelf, unsigned int tag,
261 MlirAttribute name, MlirAttribute file, uint32_t line, MlirAttribute scope,
262 MlirAttribute baseType, int64_t flags, uint64_t sizeInBits,
263 uint64_t alignInBits, intptr_t nElements, MlirAttribute const *elements,
264 MlirAttribute dataLocation, MlirAttribute rank, MlirAttribute allocated,
265 MlirAttribute associated);
266
267/// Creates a LLVM DIDerivedType attribute. Note that `dwarfAddressSpace` is an
268/// optional field, where `MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL` indicates null
269/// and non-negative values indicate a value present.
271 MlirContext ctx, unsigned int tag, MlirAttribute name,
272 MlirAttribute baseType, uint64_t sizeInBits, uint32_t alignInBits,
273 uint64_t offsetInBits, int64_t dwarfAddressSpace, MlirAttribute extraData);
274
276 MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits,
277 uint32_t alignInBits, MlirAttribute stringLength,
278 MlirAttribute stringLengthExp, MlirAttribute stringLocationExp,
279 MlirLLVMTypeEncoding encoding);
280
281/// Constant to represent std::nullopt for dwarfAddressSpace to omit the field.
282#define MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL -1
283
284/// Gets the base type from a LLVM DIDerivedType attribute.
285MLIR_CAPI_EXPORTED MlirAttribute
286mlirLLVMDIDerivedTypeAttrGetBaseType(MlirAttribute diDerivedType);
287
288/// Creates a LLVM DIFileAttr attribute.
289MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet(MlirContext ctx,
290 MlirAttribute name,
291 MlirAttribute directory);
292
300
308
309/// Creates a LLVM DICompileUnit attribute.
311 MlirContext ctx, MlirAttribute id, unsigned int sourceLanguage,
312 MlirAttribute file, MlirAttribute producer, bool isOptimized,
313 MlirLLVMDIEmissionKind emissionKind, MlirLLVMDINameTableKind nameTableKind,
314 MlirAttribute splitDebugFilename);
315
316/// Creates a LLVM DIFlags attribute.
317MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet(MlirContext ctx,
318 uint64_t value);
319
320/// Creates a LLVM DILexicalBlock attribute.
322 MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int line,
323 unsigned int column);
324
325/// Creates a LLVM DILexicalBlockFile attribute.
327 MlirContext ctx, MlirAttribute scope, MlirAttribute file,
328 unsigned int discriminator);
329
330/// Creates a LLVM DILocalVariableAttr attribute.
332 MlirContext ctx, MlirAttribute scope, MlirAttribute name,
333 MlirAttribute diFile, unsigned int line, unsigned int arg,
334 unsigned int alignInBits, MlirAttribute diType, int64_t flags);
335
336/// Creates a self-referencing LLVM DISubprogramAttr attribute.
337MLIR_CAPI_EXPORTED MlirAttribute
338mlirLLVMDISubprogramAttrGetRecSelf(MlirAttribute recId);
339
340/// Creates a LLVM DISubprogramAttr attribute.
342 MlirContext ctx, MlirAttribute recId, bool isRecSelf, MlirAttribute id,
343 MlirAttribute compileUnit, MlirAttribute scope, MlirAttribute name,
344 MlirAttribute linkageName, MlirAttribute file, unsigned int line,
345 unsigned int scopeLine, uint64_t subprogramFlags, MlirAttribute type,
346 intptr_t nRetainedNodes, MlirAttribute const *retainedNodes,
347 intptr_t nAnnotations, MlirAttribute const *annotations);
348
349/// Creates a LLVM DIAnnotation attribute.
351 MlirContext ctx, MlirAttribute name, MlirAttribute value);
352
353/// Gets the scope from this DISubprogramAttr.
354MLIR_CAPI_EXPORTED MlirAttribute
355mlirLLVMDISubprogramAttrGetScope(MlirAttribute diSubprogram);
356
357/// Gets the line from this DISubprogramAttr.
358MLIR_CAPI_EXPORTED unsigned int
359mlirLLVMDISubprogramAttrGetLine(MlirAttribute diSubprogram);
360
361/// Gets the scope line from this DISubprogram.
362MLIR_CAPI_EXPORTED unsigned int
363mlirLLVMDISubprogramAttrGetScopeLine(MlirAttribute diSubprogram);
364
365/// Gets the compile unit from this DISubprogram.
366MLIR_CAPI_EXPORTED MlirAttribute
367mlirLLVMDISubprogramAttrGetCompileUnit(MlirAttribute diSubprogram);
368
369/// Gets the file from this DISubprogramAttr.
370MLIR_CAPI_EXPORTED MlirAttribute
371mlirLLVMDISubprogramAttrGetFile(MlirAttribute diSubprogram);
372
373/// Gets the type from this DISubprogramAttr.
374MLIR_CAPI_EXPORTED MlirAttribute
375mlirLLVMDISubprogramAttrGetType(MlirAttribute diSubprogram);
376
377/// Creates a LLVM DISubroutineTypeAttr attribute.
378MLIR_CAPI_EXPORTED MlirAttribute
379mlirLLVMDISubroutineTypeAttrGet(MlirContext ctx, unsigned int callingConvention,
380 intptr_t nTypes, MlirAttribute const *types);
381
382/// Creates a LLVM DIModuleAttr attribute.
384 MlirContext ctx, MlirAttribute file, MlirAttribute scope,
385 MlirAttribute name, MlirAttribute configMacros, MlirAttribute includePath,
386 MlirAttribute apinotes, unsigned int line, bool isDecl);
387
388/// Creates a LLVM DIImportedEntityAttr attribute.
390 MlirContext ctx, unsigned int tag, MlirAttribute scope,
391 MlirAttribute entity, MlirAttribute file, unsigned int line,
392 MlirAttribute name, intptr_t nElements, MlirAttribute const *elements);
393
394/// Gets the scope of this DIModuleAttr.
395MLIR_CAPI_EXPORTED MlirAttribute
396mlirLLVMDIModuleAttrGetScope(MlirAttribute diModule);
397
398#ifdef __cplusplus
399}
400#endif
401
402#endif // MLIR_C_DIALECT_LLVM_H
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetScopeLine(MlirAttribute diSubprogram)
Gets the scope line from this DISubprogram.
Definition LLVM.cpp:362
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompositeTypeAttrGet(MlirContext ctx, MlirAttribute recId, bool isRecSelf, unsigned int tag, 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, MlirAttribute dataLocation, MlirAttribute rank, MlirAttribute allocated, MlirAttribute associated)
Creates a LLVM DICompositeType attribute.
Definition LLVM.cpp:192
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:135
MlirLLVMDINameTableKind
Definition LLVM.h:301
@ MlirLLVMDINameTableKindNone
Definition LLVM.h:304
@ MlirLLVMDINameTableKindApple
Definition LLVM.h:305
@ MlirLLVMDINameTableKindDefault
Definition LLVM.h:302
@ MlirLLVMDINameTableKindGNU
Definition LLVM.h:303
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeIdentifiedGet(MlirContext ctx, MlirStringRef name)
Creates an LLVM identified struct type with no body.
Definition LLVM.cpp:131
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMPointerType(MlirType type)
Returns true if the type is an LLVM dialect pointer type.
Definition LLVM.cpp:34
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:145
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:215
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMCConvAttrGet(MlirContext ctx, MlirLLVMCConv cconv)
Creates a LLVM CConv attribute.
Definition LLVM.cpp:245
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGetInput(MlirType type, intptr_t pos)
Returns the pos-th input type.
Definition LLVM.cpp:66
MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirContext ctx, unsigned addressSpace)
Creates an llvm.ptr type.
Definition LLVM.cpp:26
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGetElementType(MlirType type)
Returns the element type of the llvm.array type.
Definition LLVM.cpp:50
MlirLLVMLinkage
Definition LLVM.h:194
@ MlirLLVMLinkageExternal
Definition LLVM.h:195
@ MlirLLVMLinkageLinkonce
Definition LLVM.h:197
@ MlirLLVMLinkageExternWeak
Definition LLVM.h:204
@ MlirLLVMLinkageWeakODR
Definition LLVM.h:200
@ MlirLLVMLinkageCommon
Definition LLVM.h:205
@ MlirLLVMLinkageWeak
Definition LLVM.h:199
@ MlirLLVMLinkageAppending
Definition LLVM.h:201
@ MlirLLVMLinkageAvailableExternally
Definition LLVM.h:196
@ MlirLLVMLinkageLinkonceODR
Definition LLVM.h:198
@ MlirLLVMLinkageInternal
Definition LLVM.h:202
@ MlirLLVMLinkagePrivate
Definition LLVM.h:203
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsLiteral(MlirType type)
Returns true if the type is a literal (unnamed) LLVM struct type.
Definition LLVM.cpp:84
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType, unsigned numElements)
Creates an llvm.array type.
Definition LLVM.cpp:46
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMLinkageAttrGet(MlirContext ctx, MlirLLVMLinkage linkage)
Creates a LLVM Linkage attribute.
Definition LLVM.cpp:253
MLIR_CAPI_EXPORTED MlirStringRef mlirLLVMStructTypeGetIdentifier(MlirType type)
Returns the identifier of the identified struct.
Definition LLVM.cpp:100
MlirLLVMComdat
Definition LLVM.h:181
@ MlirLLVMComdatSameSize
Definition LLVM.h:186
@ MlirLLVMComdatExactMatch
Definition LLVM.h:183
@ MlirLLVMComdatNoDeduplicate
Definition LLVM.h:185
@ MlirLLVMComdatAny
Definition LLVM.h:182
@ MlirLLVMComdatLargest
Definition LLVM.h:184
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:104
MLIR_CAPI_EXPORTED bool mlirLLVMStructTypeIsPacked(MlirType type)
Returns true if the struct is packed.
Definition LLVM.cpp:96
MLIR_CAPI_EXPORTED intptr_t mlirLLVMStructTypeGetNumElementTypes(MlirType type)
Returns the number of fields in the struct.
Definition LLVM.cpp:88
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIExpressionAttrGet(MlirContext ctx, intptr_t nOperations, MlirAttribute const *operations)
Creates a LLVM DIExpression attribute.
Definition LLVM.cpp:163
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetScope(MlirAttribute diSubprogram)
Gets the scope from this DISubprogramAttr.
Definition LLVM.cpp:354
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMPointerTypeGetTypeID(void)
Definition LLVM.cpp:30
MLIR_CAPI_EXPORTED MlirTypeID mlirLLVMStructTypeGetTypeID(void)
Definition LLVM.cpp:80
MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet(MlirContext ctx)
Creates an llmv.void type.
Definition LLVM.cpp:42
MLIR_CAPI_EXPORTED intptr_t mlirLLVMFunctionTypeGetNumInputs(MlirType type)
Returns the number of input types.
Definition LLVM.cpp:62
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubroutineTypeAttrGet(MlirContext ctx, unsigned int callingConvention, intptr_t nTypes, MlirAttribute const *types)
Creates a LLVM DISubroutineTypeAttr attribute.
Definition LLVM.cpp:308
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetFile(MlirAttribute diSubprogram)
Gets the file from this DISubprogramAttr.
Definition LLVM.cpp:371
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeGetElementType(MlirType type, intptr_t position)
Returns the positions-th field of the struct.
Definition LLVM.cpp:92
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILocalVariableAttrGet(MlirContext ctx, MlirAttribute scope, MlirAttribute name, MlirAttribute diFile, unsigned int line, unsigned int arg, unsigned int alignInBits, MlirAttribute diType, int64_t flags)
Creates a LLVM DILocalVariableAttr attribute.
Definition LLVM.cpp:298
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGet(MlirContext ctx, MlirAttribute recId, bool isRecSelf, MlirAttribute id, MlirAttribute compileUnit, MlirAttribute scope, MlirAttribute name, MlirAttribute linkageName, MlirAttribute file, unsigned int line, unsigned int scopeLine, uint64_t subprogramFlags, MlirAttribute type, intptr_t nRetainedNodes, MlirAttribute const *retainedNodes, intptr_t nAnnotations, MlirAttribute const *annotations)
Creates a LLVM DISubprogramAttr attribute.
Definition LLVM.cpp:325
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDILexicalBlockFileAttrGet(MlirContext ctx, MlirAttribute scope, MlirAttribute file, unsigned int discriminator)
Creates a LLVM DILexicalBlockFile attribute.
Definition LLVM.cpp:289
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:178
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFileAttrGet(MlirContext ctx, MlirAttribute name, MlirAttribute directory)
Creates a LLVM DIFileAttr attribute.
Definition LLVM.cpp:257
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMComdatAttrGet(MlirContext ctx, MlirLLVMComdat comdat)
Creates a LLVM Comdat attribute.
Definition LLVM.cpp:249
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIModuleAttrGetScope(MlirAttribute diModule)
Gets the scope of this DIModuleAttr.
Definition LLVM.cpp:393
MLIR_CAPI_EXPORTED MlirType mlirLLVMStructTypeOpaqueGet(MlirContext ctx, MlirStringRef name)
Definition LLVM.cpp:127
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes, MlirType const *argumentTypes, bool isVarArg)
Creates an llvm.func type.
Definition LLVM.cpp:54
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompositeTypeAttrGetRecSelf(MlirAttribute recId)
Creates a self-referencing LLVM DICompositeType attribute.
Definition LLVM.cpp:187
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIFlagsAttrGet(MlirContext ctx, uint64_t value)
Creates a LLVM DIFlags attribute.
Definition LLVM.cpp:275
MlirLLVMCConv
Definition LLVM.h:126
@ MlirLLVMCConvPTX_Device
Definition LLVM.h:148
@ MlirLLVMCConvWASM_EmscriptenInvoke
Definition LLVM.h:171
@ MlirLLVMCConvX86_VectorCall
Definition LLVM.h:154
@ MlirLLVMCConvARM_AAPCS_VFP
Definition LLVM.h:144
@ MlirLLVMCConvMSP430_BUILTIN
Definition LLVM.h:166
@ MlirLLVMCConvX86_FastCall
Definition LLVM.h:141
@ MlirLLVMCConvHiPE
Definition LLVM.h:131
@ MlirLLVMCConvAMDGPU_HS
Definition LLVM.h:165
@ MlirLLVMCConvPreserveMost
Definition LLVM.h:133
@ MlirLLVMCConvX86_ThisCall
Definition LLVM.h:146
@ MlirLLVMCConvPTX_Kernel
Definition LLVM.h:147
@ MlirLLVMCConvAMDGPU_KERNEL
Definition LLVM.h:163
@ MlirLLVMCConvCFGuard_Check
Definition LLVM.h:138
@ MlirLLVMCConvAMDGPU_ES
Definition LLVM.h:168
@ MlirLLVMCConvSPIR_FUNC
Definition LLVM.h:149
@ MlirLLVMCConvAMDGPU_LS
Definition LLVM.h:167
@ MlirLLVMCConvDUMMY_HHVM_C
Definition LLVM.h:156
@ MlirLLVMCConvCold
Definition LLVM.h:129
@ MlirLLVMCConvWin64
Definition LLVM.h:153
@ MlirLLVMCConvX86_INTR
Definition LLVM.h:157
@ MlirLLVMCConvAnyReg
Definition LLVM.h:132
@ MlirLLVMCConvDUMMY_HHVM
Definition LLVM.h:155
@ MlirLLVMCConvTail
Definition LLVM.h:137
@ MlirLLVMCConvCXX_FAST_TLS
Definition LLVM.h:136
@ MlirLLVMCConvAVR_INTR
Definition LLVM.h:158
@ MlirLLVMCConvSwift
Definition LLVM.h:135
@ MlirLLVMCConvPreserveAll
Definition LLVM.h:134
@ MlirLLVMCConvFast
Definition LLVM.h:128
@ MlirLLVMCConvC
Definition LLVM.h:127
@ MlirLLVMCConvAMDGPU_Gfx
Definition LLVM.h:172
@ MlirLLVMCConvX86_RegCall
Definition LLVM.h:164
@ MlirLLVMCConvAMDGPU_VS
Definition LLVM.h:160
@ MlirLLVMCConvAArch64_VectorCall
Definition LLVM.h:169
@ MlirLLVMCConvAMDGPU_CS
Definition LLVM.h:162
@ MlirLLVMCConvGHC
Definition LLVM.h:130
@ MlirLLVMCConvAArch64_SVE_VectorCall
Definition LLVM.h:170
@ MlirLLVMCConvX86_StdCall
Definition LLVM.h:140
@ MlirLLVMCConvAMDGPU_GS
Definition LLVM.h:161
@ MlirLLVMCConvMSP430_INTR
Definition LLVM.h:145
@ MlirLLVMCConvM68k_INTR
Definition LLVM.h:173
@ MlirLLVMCConvARM_AAPCS
Definition LLVM.h:143
@ MlirLLVMCConvAVR_BUILTIN
Definition LLVM.h:159
@ MlirLLVMCConvX86_64_SysV
Definition LLVM.h:152
@ MlirLLVMCConvSPIR_KERNEL
Definition LLVM.h:150
@ MlirLLVMCConvSwiftTail
Definition LLVM.h:139
@ MlirLLVMCConvIntel_OCL_BI
Definition LLVM.h:151
@ MlirLLVMCConvARM_APCS
Definition LLVM.h:142
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetRecSelf(MlirAttribute recId)
Creates a self-referencing LLVM DISubprogramAttr attribute.
Definition LLVM.cpp:321
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:108
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDICompileUnitAttrGet(MlirContext ctx, MlirAttribute id, unsigned int sourceLanguage, MlirAttribute file, MlirAttribute producer, bool isOptimized, MlirLLVMDIEmissionKind emissionKind, MlirLLVMDINameTableKind nameTableKind, MlirAttribute splitDebugFilename)
Creates a LLVM DICompileUnit attribute.
Definition LLVM.cpp:263
MlirLLVMDIEmissionKind
Definition LLVM.h:293
@ MlirLLVMDIEmissionKindLineTablesOnly
Definition LLVM.h:296
@ MlirLLVMDIEmissionKindFull
Definition LLVM.h:295
@ MlirLLVMDIEmissionKindNone
Definition LLVM.h:294
@ MlirLLVMDIEmissionKindDebugDirectivesOnly
Definition LLVM.h:297
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIDerivedTypeAttrGetBaseType(MlirAttribute diDerivedType)
Gets the base type from a LLVM DIDerivedType attribute.
Definition LLVM.cpp:241
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIAnnotationAttrGet(MlirContext ctx, MlirAttribute name, MlirAttribute value)
Creates a LLVM DIAnnotation attribute.
Definition LLVM.cpp:411
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIImportedEntityAttrGet(MlirContext ctx, unsigned int tag, MlirAttribute scope, MlirAttribute entity, MlirAttribute file, unsigned int line, MlirAttribute name, intptr_t nElements, MlirAttribute const *elements)
Creates a LLVM DIImportedEntityAttr attribute.
Definition LLVM.cpp:397
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:279
MLIR_CAPI_EXPORTED bool mlirTypeIsALLVMStructType(MlirType type)
Returns true if the type is an LLVM dialect struct type.
Definition LLVM.cpp:76
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:155
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetCompileUnit(MlirAttribute diSubprogram)
Gets the compile unit from this DISubprogram.
Definition LLVM.cpp:367
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:117
MlirLLVMTypeEncoding
Definition LLVM.h:225
@ MlirLLVMTypeEncodingComplexFloat
Definition LLVM.h:228
@ MlirLLVMTypeEncodingDecimalFloat
Definition LLVM.h:240
@ MlirLLVMTypeEncodingLoUser
Definition LLVM.h:244
@ MlirLLVMTypeEncodingUnsigned
Definition LLVM.h:232
@ MlirLLVMTypeEncodingSignedFixed
Definition LLVM.h:238
@ MlirLLVMTypeEncodingASCII
Definition LLVM.h:243
@ MlirLLVMTypeEncodingUTF
Definition LLVM.h:241
@ MlirLLVMTypeEncodingBoolean
Definition LLVM.h:227
@ MlirLLVMTypeEncodingPackedDecimal
Definition LLVM.h:235
@ MlirLLVMTypeEncodingHiUser
Definition LLVM.h:245
@ MlirLLVMTypeEncodingAddress
Definition LLVM.h:226
@ MlirLLVMTypeEncodingImaginaryFloat
Definition LLVM.h:234
@ MlirLLVMTypeEncodingUnsignedChar
Definition LLVM.h:233
@ MlirLLVMTypeEncodingUCS
Definition LLVM.h:242
@ MlirLLVMTypeEncodingNumericString
Definition LLVM.h:236
@ MlirLLVMTypeEncodingSignedChar
Definition LLVM.h:231
@ MlirLLVMTypeEncodingEdited
Definition LLVM.h:237
@ MlirLLVMTypeEncodingUnsignedFixed
Definition LLVM.h:239
@ MlirLLVMTypeEncodingSigned
Definition LLVM.h:230
@ MlirLLVMTypeEncodingFloatT
Definition LLVM.h:229
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDINullTypeAttrGet(MlirContext ctx)
Creates a LLVM DINullType attribute.
Definition LLVM.cpp:174
MLIR_CAPI_EXPORTED unsigned int mlirLLVMDISubprogramAttrGetLine(MlirAttribute diSubprogram)
Gets the line from this DISubprogramAttr.
Definition LLVM.cpp:358
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDISubprogramAttrGetType(MlirAttribute diSubprogram)
Gets the type from this DISubprogramAttr.
Definition LLVM.cpp:375
MLIR_CAPI_EXPORTED MlirType mlirLLVMFunctionTypeGetReturnType(MlirType type)
Returns the return type of the function type.
Definition LLVM.cpp:72
MLIR_CAPI_EXPORTED unsigned mlirLLVMPointerTypeGetAddressSpace(MlirType pointerType)
Returns address space of llvm.ptr.
Definition LLVM.cpp:38
MLIR_CAPI_EXPORTED MlirAttribute mlirLLVMDIStringTypeAttrGet(MlirContext ctx, unsigned int tag, MlirAttribute name, uint64_t sizeInBits, uint32_t alignInBits, MlirAttribute stringLength, MlirAttribute stringLengthExp, MlirAttribute stringLocationExp, MlirLLVMTypeEncoding encoding)
Definition LLVM.cpp:228
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:379
#define MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Name, Namespace)
Definition IR.h:215
#define MLIR_CAPI_EXPORTED
Definition Support.h:46
The OpAsmOpInterface, see OpAsmInterface.td for more details.
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