[llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Oct 8 16:37:02 PDT 2002
Changes in directory llvm/lib/Transforms/Utils:
SimplifyCFG.cpp updated: 1.5 -> 1.6
---
Log message:
Changes to support PHINode::removeIncoming changes
---
Diffs of the changes:
Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.5 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.6
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.5 Tue Sep 24 11:09:17 2002
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Tue Oct 8 16:36:33 2002
@@ -1,13 +1,6 @@
//===- SimplifyCFG.cpp - Code to perform CFG simplification ---------------===//
//
-// SimplifyCFG - This function is used to do simplification of a CFG. For
-// example, it adjusts branches to branches to eliminate the extra hop, it
-// eliminates unreachable basic blocks, and does other "peephole" optimization
-// of the CFG. It returns true if a modification was made, and returns an
-// iterator that designates the first element remaining after the block that
-// was deleted.
-//
-// WARNING: The entry node of a function may not be simplified.
+// Peephole optimize the CFG.
//
//===----------------------------------------------------------------------===//
@@ -48,7 +41,7 @@
// Loop over all of the PHI nodes in the successor BB
for (BasicBlock::iterator I = Succ->begin();
PHINode *PN = dyn_cast<PHINode>(&*I); ++I) {
- Value *OldVal = PN->removeIncomingValue(BB);
+ Value *OldVal = PN->removeIncomingValue(BB, false);
assert(OldVal && "No entry in PHI for Pred BB!");
for (std::vector<BasicBlock*>::const_iterator PredI = BBPreds.begin(),
More information about the llvm-commits
mailing list