diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:36:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:36:33 +0000 |
commit | a704ac8a660f68d1e0b434abdf56aa9a8c1233cc (patch) | |
tree | b6c5e9d59a7113c4e5de00506481bf6311dfe91f /llvm/lib | |
parent | fae98a2d28fce54c21e30b9f5163e902841ee39d (diff) | |
download | bcm5719-llvm-a704ac8a660f68d1e0b434abdf56aa9a8c1233cc.tar.gz bcm5719-llvm-a704ac8a660f68d1e0b434abdf56aa9a8c1233cc.zip |
Changes to support PHINode::removeIncoming changes
llvm-svn: 4079
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 341b5ac37db..6b642360d6c 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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 @@ static bool PropogatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { // 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(), |