Adjust to changes in instruction interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-01-29 00:39:08 +00:00
parent 667fdaef9f
commit 5551706b0f
3 changed files with 11 additions and 10 deletions

View File

@@ -575,7 +575,7 @@ Instruction *InstCombiner::FoldOpIntoPhi(Instruction &I) {
// Okay, we can do the transformation: create the new PHI node.
PHINode *NewPN = new PHINode(I.getType(), I.getName());
I.setName("");
NewPN->op_reserve(PN->getNumOperands());
NewPN->reserveOperandSpace(PN->getNumOperands()/2);
InsertNewInstBefore(NewPN, *PN);
// Next, add all of the operands to the PHI.
@@ -4142,7 +4142,7 @@ Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) {
// correct type, and PHI together all of the LHS's of the instructions.
PHINode *NewPN = new PHINode(FirstInst->getOperand(0)->getType(),
PN.getName()+".in");
NewPN->op_reserve(PN.getNumOperands());
NewPN->reserveOperandSpace(PN.getNumOperands()/2);
Value *InVal = FirstInst->getOperand(0);
NewPN->addIncoming(InVal, PN.getIncomingBlock(0));