[all-commits] [llvm/llvm-project] 7f5588: [MLIR] make One-Shot and SCF bufferization TensorL...

Dmitrii Makarenko via All-commits all-commits at lists.llvm.org
Fri Apr 17 01:05:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f5588f35abefa7f961fd471eb5282ab384dc46a
      https://github.com/llvm/llvm-project/commit/7f5588f35abefa7f961fd471eb5282ab384dc46a
  Author: Dmitrii Makarenko <dmitrii.makarenko at intel.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
    M mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp
    M mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize.mlir
    M mlir/test/lib/Dialect/Test/TestOpDefs.cpp
    M mlir/test/lib/Dialect/Test/TestOps.td

  Log Message:
  -----------
  [MLIR] make One-Shot and SCF bufferization TensorLikeType-aware (#189073)

Fix bufferization inconsistencies between builtin tensor types and
custom TensorLikeType implementations across One-Shot analysis/module
paths and SCF bufferization interfaces.

The main issue was a mix of TensorType/RankedTensorType checks in places
that need TensorLikeType-aware handling. This could leave
function-boundary equivalence/aliasing incomplete for custom tensor-like
types, leading to spurious SCF loop equivalence verification failures.

This change:
- switches relevant One-Shot analysis/module checks from TensorType/
RankedTensorType to TensorLikeType;
- updates generic/default aliasing utilities to treat TensorLikeType
consistently;
- updates SCF BufferizableOpInterface implementations
(for/while/if/yield related paths) to use TensorLikeType/BufferLikeType
where appropriate;
- updates test custom ops to provide required aliasing/getBufferType
hooks for custom tensor-like types;
- refreshes and renames custom_types SCF tests to explicitly check
memref replacement after bufferization.

Potential follow-ups / known risk areas:
- SCF.Forall shared_outs still has RankedTensorType assumptions in
signatures/ paths and should be audited for full TensorLikeType
coverage.
- SCF.For and SCF.While resolveConflicts call
allocateTensorForShapedValue, which currently assumes ranked
tensor/memref copy paths; this may still be a limitation for some
tensor-like/unranked scenarios.

---------

Signed-off-by: Dmitrii Makarenko <dmitrii.makarenko at intel.com>



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