summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LowerAffine.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-01-26 12:40:12 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 15:40:23 -0700
commit36babbd7815519db5d26f55695fa3ec500997bcd (patch)
tree9686f3f296ff2d849ffb2f69434e50b4e6fce901 /mlir/lib/Transforms/LowerAffine.cpp
parent0e7a8a9027c5f5862c3c78f41c777ba2930f9b23 (diff)
downloadbcm5719-llvm-36babbd7815519db5d26f55695fa3ec500997bcd.tar.gz
bcm5719-llvm-36babbd7815519db5d26f55695fa3ec500997bcd.zip
Change the ForInst induction variable to be a block argument of the body instead of the ForInst itself. This is a necessary step in converting ForInst into an operation.
PiperOrigin-RevId: 231064139
Diffstat (limited to 'mlir/lib/Transforms/LowerAffine.cpp')
-rw-r--r--mlir/lib/Transforms/LowerAffine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp
index 99ee603bb05..94f300bd16a 100644
--- a/mlir/lib/Transforms/LowerAffine.cpp
+++ b/mlir/lib/Transforms/LowerAffine.cpp
@@ -348,7 +348,7 @@ bool LowerAffinePass::lowerForInst(ForInst *forInst) {
oldBody->begin(), oldBody->end());
// The code in the body of the forInst now uses 'iv' as its indvar.
- forInst->replaceAllUsesWith(iv);
+ forInst->getInductionVar()->replaceAllUsesWith(iv);
// Append the induction variable stepping logic and branch back to the exit
// condition block. Construct an affine expression f : (x -> x+step) and
OpenPOWER on IntegriCloud