[Mlir-commits] [mlir] [mlir-tblgen] Emit named operand indices (PR #146839)

Mehdi Amini llvmlistbot at llvm.org
Fri Jul 4 07:54:38 PDT 2025


joker-eph wrote:

> Is this a question or a statement?

This was a statement (such method is possible I believe), with a question in the parenthesis (whether it would be the opposite of ...).

> It is done in https://github.com/llvm/llvm-project/pull/144785 which uses it for this pupose. In principle: Check whether a given operand index falls into the range of getODSOperandIndexAndLength(argnum), where argnum is one of the named constants such as odsIndex_input. Equivalently, but less efficient, llvm::contains(opoperand, getODSOperand(OpB::odsIndex_input)).

Gotcha, thanks for explaining!

Anyway I agree that being able to use getODSOperandIndexAndLength() without a magic constant is a nice improvement.


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


More information about the Mlir-commits mailing list