[Mlir-commits] [mlir] [mlir][ODS] Fix default inferReturnTypes generation for variadic operands (PR #131483)
Kunwar Grover
llvmlistbot at llvm.org
Wed Mar 19 04:51:24 PDT 2025
Groverkss wrote:
> I kind of remember that InferReturnTypes can be called by the verifier on invalid IR, but the adaptor aren't resilient to invalid IR I believe: are we risking crashes during verification here?
This is okay, inferReturnTypes documents [1] that the operands passed should already be verified. We are only using the operand accessors for verifiers so if we crash, it is expected documented behavior. It's really hard to verify if the operands are correct otherwise (we might just go into an infinite verification loop otherwise, although i could be wrong here).
[1]: https://github.com/llvm/llvm-project/blob/449cdfacc07bd365d49a637196ce8f8067cf845c/mlir/include/mlir/Interfaces/InferTypeOpInterface.td#L37-L39
https://github.com/llvm/llvm-project/pull/131483
More information about the Mlir-commits
mailing list