[Mlir-commits] [mlir] 3a6c4f3 - [mlir] Add a helper for TiledLoopOp to get an operand tied to the bbArg.
Alexander Belyaev
llvmlistbot at llvm.org
Wed Dec 1 00:32:23 PST 2021
Author: Alexander Belyaev
Date: 2021-12-01T09:32:00+01:00
New Revision: 3a6c4f307bd0273c72cbf7e5ed571c4021678295
URL: https://github.com/llvm/llvm-project/commit/3a6c4f307bd0273c72cbf7e5ed571c4021678295
DIFF: https://github.com/llvm/llvm-project/commit/3a6c4f307bd0273c72cbf7e5ed571c4021678295.diff
LOG: [mlir] Add a helper for TiledLoopOp to get an operand tied to the bbArg.
Differential Revision: https://reviews.llvm.org/D114852
Added:
Modified:
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
index bb61d3f088f91..50676b09508bb 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
@@ -660,6 +660,12 @@ def Linalg_TiledLoopOp : Linalg_Op<"tiled_loop", [
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();
More information about the Mlir-commits
mailing list