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

Fabian Mora llvmlistbot at llvm.org
Tue Feb 25 04:30:52 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,
----------------
fabianmcg wrote:

> I am guessing part of the issue is that this concerns a per type compatibility check whereas you introduced another global DLTI key.

That's exactly the reason. Further, passing just the value for the `default_memory_space` was too specific.

My reasoning is: to determine DL type compatibility the method should have a view of all the global entries. Eventually it would be nice to be able to collect all the global entries  with a method, but that's out of scope of this patch.

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


More information about the Mlir-commits mailing list