aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 15462c9..3c8e14a 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -66,7 +66,7 @@ static bool canBeHoisted(Operation *op,
// can be hoisted.
for (auto &region : op->getRegions()) {
for (auto &block : region) {
- for (auto &innerOp : block.without_terminator())
+ for (auto &innerOp : block)
if (!canBeHoisted(&innerOp, definedOutside))
return false;
}
@@ -74,7 +74,6 @@ static bool canBeHoisted(Operation *op,
return true;
}
-
LogicalResult mlir::moveLoopInvariantCode(LoopLikeOpInterface looplike) {
auto &loopBody = looplike.getLoopBody();