diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-04-25 13:37:24 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-04-25 13:37:24 +0000 |
| commit | 517d8d2f9408718312e7d2d9fdbabe4c64bf0314 (patch) | |
| tree | ed8ba802ed4319d0ed93449dc10eecf5504a5fdb /polly/lib/Analysis/ScopDetection.cpp | |
| parent | a4dd8ef40fa89c7f3ab370a887430caefe9c9d6c (diff) | |
| download | bcm5719-llvm-517d8d2f9408718312e7d2d9fdbabe4c64bf0314.tar.gz bcm5719-llvm-517d8d2f9408718312e7d2d9fdbabe4c64bf0314.zip | |
Check only loop control of loops that are part of the region
This also removes a duplicated line of code in the region generator
that caused a SPEC benchmark to fail with the new SCoPs.
llvm-svn: 267404
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index c6676ff1dd9..2e1caf51b10 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -1240,7 +1240,8 @@ bool ScopDetection::allBlocksValid(DetectionContext &Context) const { for (const BasicBlock *BB : CurRegion.blocks()) { Loop *L = LI->getLoopFor(BB); - if (L && L->getHeader() == BB && (!isValidLoop(L, Context) && !KeepGoing)) + if (L && L->getHeader() == BB && CurRegion.contains(L) && + (!isValidLoop(L, Context) && !KeepGoing)) return false; } |

