diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:28:46 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-03-30 11:28:46 +0000 |
commit | 52131344a2cbb29f60b75417d32f886032007b1f (patch) | |
tree | c82d45a3c7045d0fe4b46727a46b1ede4a8e4e64 /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | e0938d8a87a6c8b12f68fbe784a270dd2d552331 (diff) | |
download | bcm5719-llvm-52131344a2cbb29f60b75417d32f886032007b1f.tar.gz bcm5719-llvm-52131344a2cbb29f60b75417d32f886032007b1f.zip |
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopSimplify.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index 246263026bb..9fe592962d1 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -648,9 +648,8 @@ LoopSimplify::InsertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader) { // the backedge block which correspond to any PHI nodes in the header block. for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { PHINode *PN = cast<PHINode>(I); - PHINode *NewPN = PHINode::Create(PN->getType(), PN->getName()+".be", - BETerminator); - NewPN->reserveOperandSpace(BackedgeBlocks.size()); + PHINode *NewPN = PHINode::Create(PN->getType(), BackedgeBlocks.size(), + PN->getName()+".be", BETerminator); if (AA) AA->copyValue(PN, NewPN); // Loop over the PHI node, moving all entries except the one for the |