summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/CodeGeneration.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/polly/lib/CodeGeneration.cpp b/polly/lib/CodeGeneration.cpp
index 17613cbfbda..3b6aa191a41 100644
--- a/polly/lib/CodeGeneration.cpp
+++ b/polly/lib/CodeGeneration.cpp
@@ -1608,6 +1608,9 @@ class CodeGeneration : public ScopPass {
newBlock = SplitEdge(region->getEnteringBlock(), region->getEntry(), this);
if (DT->dominates(region->getEntry(), newBlock)) {
+ BasicBlock *OldBlock = region->getEntry();
+ std::string OldName = OldBlock->getName();
+
// Update ScopInfo.
for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI)
if ((*SI)->getBasicBlock() == newBlock) {
@@ -1616,7 +1619,9 @@ class CodeGeneration : public ScopPass {
}
// Update RegionInfo.
- splitBlock = region->getEntry();
+ splitBlock = OldBlock;
+ OldBlock->setName("polly.split");
+ newBlock->setName(OldName);
region->replaceEntry(newBlock);
RI->setRegionFor(newBlock, region);
} else {
OpenPOWER on IntegriCloud