[Mlir-commits] [mlir] b635492 - [mlir][Affine][NFC] Return BlockArgument in AffineForOp::getInductionVar
Diego Caballero
llvmlistbot at llvm.org
Fri Mar 5 14:06:10 PST 2021
Author: Diego Caballero
Date: 2021-03-06T00:02:19+02:00
New Revision: b635492c3f1a51eb2026bc2add9fefd7a92004b0
URL: https://github.com/llvm/llvm-project/commit/b635492c3f1a51eb2026bc2add9fefd7a92004b0
DIFF: https://github.com/llvm/llvm-project/commit/b635492c3f1a51eb2026bc2add9fefd7a92004b0.diff
LOG: [mlir][Affine][NFC] Return BlockArgument in AffineForOp::getInductionVar
This avoids unnecessary casts when a BlockArgument is required.
Reviewed By: bondhugula
Differential Revision: https://reviews.llvm.org/D97879
Added:
Modified:
mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
index c32b23508efe..734075beb9d2 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
+++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
@@ -233,7 +233,7 @@ def AffineForOp : Affine_Op<"for",
static StringRef getLowerBoundAttrName() { return "lower_bound"; }
static StringRef getUpperBoundAttrName() { return "upper_bound"; }
- Value getInductionVar() { return getBody()->getArgument(0); }
+ BlockArgument getInductionVar() { return getBody()->getArgument(0); }
Block::BlockArgListType getRegionIterArgs() {
return getBody()->getArguments().drop_front();
}
More information about the Mlir-commits
mailing list