Fabian Mora 8c97ddff53
[mlir][DataLayout] Add a default memory space entry to the data layout. (#127416)
This patch adds a default memory space attribute to the DL and adds
methods to query the attribute. This is required as MLIR has no well
defined default memory space unlike LLVM which has 0. While `nullptr` is
a candidate for default memory space, the `ptr` dialect will remove the
possibility for `nullptr` memory spaces to avoid undefined semantics.

This patch also modifies the `DataLayoutTypeInterface::areCompatible` to
include the new DL spec and merged entries, as it is needed to query the default memory
space.

---------

Co-authored-by: Christian Ulmann <christianulmann@gmail.com>
2025-03-11 17:39:20 -04:00
..