mirror-llvm-project/mlir/test/Dialect/ControlFlow
Andrei Golubev 0b1fe74f07
[mlir][bufferization] Introduce reconcileBufferTypeMismatchFn hook (#202667)
This PR is the first part of the work that aims to allow customizations
in resolving mismatching buffer types.

Add a new bufferization hook that lets downstream bufferization
implementations define how to handle buffer mismatches that appear
during type inference in various upstream scenarios.

The hook is used as a fallback mechanism in several upstream operations.
For example, when bufferizing block signatures (scf.execute_region), and
resolving "branch" conflicts (scf.if, scfl.index_switch, scf.for,
arith.select).

The hook returns a valid buffer type when reconciliation succeeded;
failure indicates reconciliation failure and should be treated as
bufferization failure. The caller of the hook is expected to use the
returned buffer type. By default, a memref with fully-dynamic layout map
is returned (for unranked case, buffers are assumed to match).

---------

Co-authored-by: Dmitrii Makarenko <dmitrii.makarenko@intel.com>
2026-06-22 11:20:19 +02:00
..
canonicalize.mlir [mlir][cf] Canonicalize block args with uniform incoming values (#183966) 2026-03-04 12:03:17 +01:00
invalid.mlir
one-shot-bufferize-analysis.mlir
one-shot-bufferize-invalid.mlir [mlir][bufferization] Introduce reconcileBufferTypeMismatchFn hook (#202667) 2026-06-22 11:20:19 +02:00
one-shot-bufferize.mlir
ops.mlir
value-bounds-op-interface-impl.mlir [MLIR] Fix crash in ValueBoundsConstraintSet for non-entry block args (#185048) 2026-03-11 14:21:22 +01:00