[all-commits] [llvm/llvm-project] d4304d: [mlir][memref] Verify out-of-bounds access for `me...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Mar 25 03:25:34 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4304d85f26984aa772fcddf1f34604e526a6683
      https://github.com/llvm/llvm-project/commit/d4304d85f26984aa772fcddf1f34604e526a6683
  Author: Matthias Springer <me at m-sp.org>
  Date:   2025-03-25 (Tue, 25 Mar 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    M mlir/include/mlir/Interfaces/ViewLikeInterface.h
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
    M mlir/test/Dialect/Linalg/promote.mlir
    M mlir/test/Dialect/MemRef/canonicalize.mlir
    M mlir/test/Dialect/MemRef/expand-strided-metadata.mlir
    M mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
    M mlir/test/Dialect/MemRef/invalid.mlir
    M mlir/test/Dialect/MemRef/subview.mlir
    M mlir/test/Transforms/canonicalize.mlir
    M mlir/test/Transforms/compose-subview.mlir

  Log Message:
  -----------
  [mlir][memref] Verify out-of-bounds access for `memref.subview` (#131876)

* Improve the verifier of `memref.subview` to detect out-of-bounds
extractions.
* Improve the documentation of `memref.subview` to make clear that
out-of-bounds extractions are not allowed. Rewrite examples to use the
new `strided<>` notation instead of `affine_map` layout maps. Also
remove all unrelated operations (`memref.alloc`) from the examples.
* Fix various test cases where `memref.subview` ops ran out-of-bounds.
* Update canonicalizations patterns to ensure that they do not fold IR
if it would generate IR that no longer verifies.

Related discussion on Discourse:
https://discourse.llvm.org/t/out-of-bounds-semantics-of-memref-subview/85293



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list