File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,18 @@ void LoopOpInterface::getLoopOpSuccessorRegions(
2525 return ;
2626 }
2727
28+ mlir::Region *parentRegion =
29+ point.getTerminatorPredecessorOrNull ()->getParentRegion ();
30+
2831 // Branching from condition: go to body or exit.
29- if (&op.getCond () ==
30- point.getTerminatorPredecessorOrNull ()->getParentRegion ()) {
32+ if (&op.getCond () == parentRegion) {
3133 regions.emplace_back (mlir::RegionSuccessor (op, op->getResults ()));
3234 regions.emplace_back (&op.getBody (), op.getBody ().getArguments ());
3335 return ;
3436 }
3537
3638 // Branching from body: go to step (for) or condition.
37- if (&op.getBody () ==
38- point.getTerminatorPredecessorOrNull ()->getParentRegion ()) {
39+ if (&op.getBody () == parentRegion) {
3940 // FIXME(cir): Should we consider break/continue statements here?
4041 mlir::Region *afterBody =
4142 (op.maybeGetStep () ? op.maybeGetStep () : &op.getCond ());
@@ -44,8 +45,7 @@ void LoopOpInterface::getLoopOpSuccessorRegions(
4445 }
4546
4647 // Branching from step: go to condition.
47- if (op.maybeGetStep () ==
48- point.getTerminatorPredecessorOrNull ()->getParentRegion ()) {
48+ if (op.maybeGetStep () == parentRegion) {
4949 regions.emplace_back (&op.getCond (), op.getCond ().getArguments ());
5050 return ;
5151 }
You can’t perform that action at this time.
0 commit comments