[Mlir-commits] [mlir] [mlir][DataLayout] Add a default memory space entry to the data layout. (PR #127416)

Rolf Morel llvmlistbot at llvm.org
Tue Feb 25 04:19:18 PST 2025


================
@@ -318,7 +318,8 @@ combineOneSpec(DataLayoutSpecInterface spec,
            "unexpected data layout entry for built-in type");
 
     auto interface = cast<DataLayoutTypeInterface>(typeSample);
-    if (!interface.areCompatible(entriesForType.lookup(kvp.first), kvp.second))
+    if (!interface.areCompatible(entriesForType.lookup(kvp.first), kvp.second,
----------------
rolfmorel wrote:

Could you please explain why passing the whole of spec here is necessary?

For example, we couldn't `"dlti.default_memory_space"` just be another "newLayout" entry that gets appropriately checked against "oldLayout" entries (however `areCompatible`'s implementers define that)?

I am guessing part of the issue is that this concerns a per type compatibility check whereas you introduced another global DLTI key. I see the tension there, though feel passing the whole of spec is probably too big a hammer to apply here.

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


More information about the Mlir-commits mailing list