[llvm-commits] [polly] r150576 - /polly/trunk/lib/CodeGeneration.cpp

Tobias Grosser grosser at fim.uni-passau.de
Wed Feb 15 01:58:50 PST 2012


Author: grosser
Date: Wed Feb 15 03:58:50 2012
New Revision: 150576

URL: http://llvm.org/viewvc/llvm-project?rev=150576&view=rev
Log:
CodeGen: Retain the old BB names within the original SCoP

Modified:
    polly/trunk/lib/CodeGeneration.cpp

Modified: polly/trunk/lib/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGeneration.cpp?rev=150576&r1=150575&r2=150576&view=diff
==============================================================================
--- polly/trunk/lib/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGeneration.cpp Wed Feb 15 03:58:50 2012
@@ -1608,6 +1608,9 @@
     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 @@
         }
 
       // Update RegionInfo.
-      splitBlock = region->getEntry();
+      splitBlock = OldBlock;
+      OldBlock->setName("polly.split");
+      newBlock->setName(OldName);
       region->replaceEntry(newBlock);
       RI->setRegionFor(newBlock, region);
     } else {





More information about the llvm-commits mailing list