diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td @@ -660,6 +660,12 @@ setOperand(pos, steps[i]); } + /// Operand that corresponds to the `bbArg` block argument. + OpOperand& getTiedOperand(BlockArgument& bbArg) { + return getOperation()->getOpOperand(getNumControlOperands() + + bbArg.getArgNumber() - getNumLoops()); + } + /// Block argument that corresponds to the `input` or `output` operand. BlockArgument getTiedBlockArgument(OpOperand& operand) { auto operandIndex = operand.getOperandNumber();