[Mlir-commits] [mlir] [mlir] Add support for recursive elements in DICompositeTypeAttr. (PR #74948)
Tobias Gysi
llvmlistbot at llvm.org
Mon Dec 11 02:40:18 PST 2023
================
@@ -684,6 +663,61 @@ def LLVM_AliasScopeDomainAttr : LLVM_Attr<"AliasScopeDomain",
let assemblyFormat = "`<` struct(params) `>`";
}
+//===----------------------------------------------------------------------===//
+// DICompositeTypeAttr
+//===----------------------------------------------------------------------===//
+
+def LLVM_DICompositeTypeAttr : LLVM_Attr<"DICompositeType", "di_composite_type",
+ /*traits=*/[NativeTypeTrait<"IsMutable">], "DITypeAttr"> {
+ let parameters = (ins
+ OptionalParameter<"unsigned">:$tag,
+ OptionalParameter<"StringAttr">:$name,
+ OptionalParameter<"DIFileAttr">:$file,
+ OptionalParameter<"uint32_t">:$line,
+ OptionalParameter<"DIScopeAttr">:$scope,
+ OptionalParameter<"DITypeAttr">:$baseType,
+ OptionalParameter<"DIFlags", "DIFlags::Zero">:$flags,
+ OptionalParameter<"uint64_t">:$sizeInBits,
+ OptionalParameter<"uint64_t">:$alignInBits,
+ OptionalArrayRefParameter<"DINodeAttr">:$elements,
+ OptionalParameter<"DistinctAttr">:$identifier
----------------
gysit wrote:
I think it makes sense to keep the identifier as a StringAttr since it actually has a counterpart in LLVM IR. At the same time, I would rename the DistinctAttr field to "id" or similar.
https://github.com/llvm/llvm-project/pull/74948
More information about the Mlir-commits
mailing list