aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorRahul Joshi <jurahul@google.com>2020-06-19 12:33:21 -0700
committerRahul Joshi <jurahul@google.com>2020-06-19 14:16:21 -0700
commitd150662024e6d06b6718e7256e5fd0ecc70585fc (patch)
treec128e0cac4797b3cfe8187ec1ed4c4af974ecf02 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
parent2565581e3704a9418e024e4fb8575ec8b14dce5d (diff)
downloadllvm-d150662024e6d06b6718e7256e5fd0ecc70585fc.zip
llvm-d150662024e6d06b6718e7256e5fd0ecc70585fc.tar.gz
llvm-d150662024e6d06b6718e7256e5fd0ecc70585fc.tar.bz2
[MLIR][NFC] Eliminate .getBlocks() when not needed
Differential Revision: https://reviews.llvm.org/D82229
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 0a78cb4..9386653 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -65,7 +65,7 @@ static bool canBeHoisted(Operation *op,
// Recurse into the regions for this op and check whether the contained ops
// can be hoisted.
for (auto &region : op->getRegions()) {
- for (auto &block : region.getBlocks()) {
+ for (auto &block : region) {
for (auto &innerOp : block.without_terminator())
if (!canBeHoisted(&innerOp, definedOutside))
return false;