aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2019-07-16 12:20:15 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-07-16 13:45:47 -0700
commit0002e2964dd665f94a00f0df3b3fc94311f6bc43 (patch)
tree2903bd3613d0a1acd5d0d7d3bf2bd673d81fba2f /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
parent2b9855b5b4e964305510caf4f170107b40fd847e (diff)
downloadllvm-0002e2964dd665f94a00f0df3b3fc94311f6bc43.zip
llvm-0002e2964dd665f94a00f0df3b3fc94311f6bc43.tar.gz
llvm-0002e2964dd665f94a00f0df3b3fc94311f6bc43.tar.bz2
Move affine.for and affine.if to ODS
As the move to ODS is made, body and region names across affine and loop dialects are uniformized. PiperOrigin-RevId: 258416590
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 48e97f4..d8b5b2d 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -186,13 +186,13 @@ bool checkInvarianceOfNestedIfOps(Operation *op, Value *indVar,
assert(isa<AffineIfOp>(op));
auto ifOp = cast<AffineIfOp>(op);
- if (!areAllOpsInTheBlockListInvariant(ifOp.getThenBlocks(), indVar,
- definedOps, opsToHoist)) {
+ if (!areAllOpsInTheBlockListInvariant(ifOp.thenRegion(), indVar, definedOps,
+ opsToHoist)) {
return false;
}
- if (!areAllOpsInTheBlockListInvariant(ifOp.getElseBlocks(), indVar,
- definedOps, opsToHoist)) {
+ if (!areAllOpsInTheBlockListInvariant(ifOp.elseRegion(), indVar, definedOps,
+ opsToHoist)) {
return false;
}