[llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 23 00:23:30 PDT 2005



Changes in directory llvm/lib/Transforms/Utils:

SimplifyCFG.cpp updated: 1.88 -> 1.89
---
Log message:

simplify some logic further


---
Diffs of the changes:  (+1 -6)

 SimplifyCFG.cpp |    7 +------
 1 files changed, 1 insertion(+), 6 deletions(-)


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.88 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.89
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.88	Fri Sep 23 01:39:30 2005
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Fri Sep 23 02:23:18 2005
@@ -1041,7 +1041,6 @@
   // that need to be moved to the dominating block.
   std::set<Instruction*> AggressiveInsts;
   
-  bool CanPromote = true;
   BasicBlock::iterator AfterPHIIt = BB->begin();
   while (isa<PHINode>(AfterPHIIt)) {
     PHINode *PN = cast<PHINode>(AfterPHIIt++);
@@ -1054,14 +1053,10 @@
                                     &AggressiveInsts) ||
                !DominatesMergePoint(PN->getIncomingValue(1), BB,
                                     &AggressiveInsts)) {
-      CanPromote = false;
+      return false;
     }
   }
   
-  // Did we eliminate all PHI's?
-  if (!CanPromote && AfterPHIIt != BB->begin())
-    return false;
-  
   // If we all PHI nodes are promotable, check to make sure that all
   // instructions in the predecessor blocks can be promoted as well.  If
   // not, we won't be able to get rid of the control flow, so it's not






More information about the llvm-commits mailing list