summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp3
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp3
2 files changed, 2 insertions, 4 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;
}
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index e980d375a17..99db6bc0263 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -1138,9 +1138,6 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
BasicBlock *BBCopy = splitBB(BB);
BasicBlock *BBCopyIDom = repairDominance(BB, BBCopy);
- // In order to remap PHI nodes we store also basic block mappings.
- BlockMap[BB] = BBCopy;
-
// Get the mapping for this block and initialize it with either the scalar
// loads from the generated entering block (which dominates all blocks of
// this subregion) or the maps of the immediate dominator, if part of the
OpenPOWER on IntegriCloud