mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 04:26:45 +00:00

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>