[Mlir-commits] [mlir] [MLIR][LLVM] add dwarfAddressSpace to DIDerivedType (PR #92043)

Billy Zhu llvmlistbot at llvm.org
Tue May 14 11:41:16 PDT 2024


================
@@ -418,6 +418,7 @@ def LLVM_DIDerivedTypeAttr : LLVM_Attr<"DIDerivedType", "di_derived_type",
     OptionalParameter<"uint64_t">:$sizeInBits,
     OptionalParameter<"uint32_t">:$alignInBits,
     OptionalParameter<"uint64_t">:$offsetInBits,
+    OptionalParameter<"std::optional<unsigned>">:$dwarfAddressSpace,
----------------
zyx-billy wrote:

oh yeah I 100% agree on the part about not emitting the 0 attribute for space saving in the general case. I'm less sure if we need to emit it for certain targets though (it's possible some targets have their quirks).

Though if it was a target-based rule on whether to emit 0, we can encode that in the llvm backend for that target. The frontend should not have to worry about it.

Now are there non-target-based rules? I'm not sure.

https://github.com/llvm/llvm-project/pull/92043


More information about the Mlir-commits mailing list