diff options
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 752209d3b3d..00055a055a1 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2071,7 +2071,7 @@ void Scop::buildDomains(Region *R) { } void Scop::buildDomainsWithBranchConstraints(Region *R) { - RegionInfo &RI = *R->getRegionInfo(); + auto &BoxedLoops = *SD.getBoxedLoops(&getRegion()); // To create the domain for each block in R we iterate over all blocks and // subregions in R and propagate the conditions under which the current region @@ -2146,10 +2146,8 @@ void Scop::buildDomainsWithBranchConstraints(Region *R) { // Do not adjust the number of dimensions if we enter a boxed loop or are // in a non-affine subregion or if the surrounding loop stays the same. Loop *SuccBBLoop = LI.getLoopFor(SuccBB); - Region *SuccRegion = RI.getRegionFor(SuccBB); - if (SD.isNonAffineSubRegion(SuccRegion, &getRegion())) - while (SuccBBLoop && SuccRegion->contains(SuccBBLoop)) - SuccBBLoop = SuccBBLoop->getParentLoop(); + while (BoxedLoops.count(SuccBBLoop)) + SuccBBLoop = SuccBBLoop->getParentLoop(); if (BBLoop != SuccBBLoop) { |

