[Mlir-commits] [mlir] [mlir][memref] Add a new `ReifyResultShapes` pass (PR #145927)

Nicolas Vasilache llvmlistbot at llvm.org
Mon Jun 30 12:09:57 PDT 2025


nicolasvasilache wrote:

> and the reify method just gets the information from the operation. The operation has to be the source of information here.

Documenting offline discussion: for a meaningful class of ops, the "transfer function" can be encoded with `IndexingOpInterface`. In the fullness of time, this would likely merge with part of the `ReifyRankedShapedTypeOpInterface` interface to become "the source of truth for the op" semantics. 
There are extra considerations wrt building IR and taking a builder or not:
- canonicalization can't build IR in the case of failure
- verifier can't even take a builder
- reify freely takes a builder and creates IR
For the class of things that can be constructed with an AffineMap transfer function, all these things can and should agree with each other, achieving confluence.

For other things, TBD what other meaningful classes of ops can have "transfer functions" that reconcile the SSA-less builder-less verifier with the SSA + builder + folding `ReifyRankedShapedTypeOpInterface`.

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


More information about the Mlir-commits mailing list