[Mlir-commits] [mlir] [mlir][linalg] Avoid asserts in IndexingMapOpInterface (PR #179072)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 4 10:21:18 PST 2026


MaheshRavishankar wrote:

> > Instead of this can we add a verifier for `IndexMapOpInterface` that checks the operands are the expected type.
> 
> What if other code calls `getStaticOperand()`, `getRank()` without calling `verifyImpl()`, I am not sure how the current approach would look like.

Each operation that implements this interface will get verified. If they are verified, then it is expected that these calls succeed. That is the general setup. The ops are expected to be "in verified state" before any analysis/transformation (so that you dont need to add such guards everywhere in the code). The verifier runs on constructions/after passes/pattern applications, etc. So under the expectation that the op is valid, then the assert can stay an assert cause that is expected to not fail.

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


More information about the Mlir-commits mailing list