[Mlir-commits] [mlir] [MLIR] Add index bitwidth to the DataLayout (PR #85927)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Mar 20 07:59:01 PDT 2024


================
@@ -280,10 +280,9 @@ translateDataLayout(DataLayoutSpecInterface attribute,
               uint64_t abi = dataLayout.getTypeABIAlignment(type) * 8u;
               uint64_t preferred =
                   dataLayout.getTypePreferredAlignment(type) * 8u;
-              layoutStream << size << ":" << abi << ":" << preferred;
-              if (std::optional<uint64_t> index = extractPointerSpecValue(
-                      entry.getValue(), PtrDLEntryPos::Index))
-                layoutStream << ":" << *index;
+              uint64_t index = *dataLayout.getTypeIndexBitwidth(type);
----------------
ftynse wrote:

Are we sure this never returns nullopt?

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


More information about the Mlir-commits mailing list