[llvm-branch-commits] [mlir] [mlir][memref] Check memory space before lowering alloc ops (PR #134427)

Markus Böck via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Apr 5 15:05:08 PDT 2025


================
@@ -75,9 +75,11 @@ class ConvertToLLVMPattern : public ConversionPattern {
                              ValueRange indices,
                              ConversionPatternRewriter &rewriter) const;
 
-  /// Returns if the given memref has identity maps and the element type is
-  /// convertible to LLVM.
-  bool isConvertibleAndHasIdentityMaps(MemRefType type) const;
+  /// Returns if the given memref type is convertible to LLVM and has an
+  /// identity layout map. If `verifyMemorySpace` is set to "false", the memory
+  /// space of the memref type is ignored.
+  bool isConvertibleAndHasIdentityMaps(MemRefType type,
+                                       bool verifyMemorySpace = true) const;
----------------
zero9178 wrote:

Is there any scenario where we'd want to set this to false? I would rather remove the option unless needed

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


More information about the llvm-branch-commits mailing list