diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
commit | 051a950000e21935165db56695e35bade668193b (patch) | |
tree | 76db4bc690c153a1cfbd2989849c3b1d95500390 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | d963ab1f58adb6daa028533ff3285841d7e45f80 (diff) |
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 44c3d78e8f..43054227ae 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -145,8 +145,8 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, Value *AddedVal = GEPI->getOperand(1); // Insert a new integer PHI node into the top of the block. - PHINode *NewPhi = new PHINode(AddedVal->getType(), - PN->getName()+".rec", PN); + PHINode *NewPhi = PHINode::Create(AddedVal->getType(), + PN->getName()+".rec", PN); NewPhi->addIncoming(Constant::getNullValue(NewPhi->getType()), Preheader); // Create the new add instruction. @@ -181,7 +181,7 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, Value *Idx[2]; Idx[0] = Constant::getNullValue(Type::Int32Ty); Idx[1] = NewAdd; - GetElementPtrInst *NGEPI = new GetElementPtrInst( + GetElementPtrInst *NGEPI = GetElementPtrInst::Create( NCE, Idx, Idx + 2, GEPI->getName(), GEPI); SE->deleteValueFromRecords(GEPI); @@ -200,8 +200,8 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, BasicBlock::iterator InsertPos = PN; ++InsertPos; while (isa<PHINode>(InsertPos)) ++InsertPos; Value *PreInc = - new GetElementPtrInst(PN->getIncomingValue(PreheaderIdx), - NewPhi, "", InsertPos); + GetElementPtrInst::Create(PN->getIncomingValue(PreheaderIdx), + NewPhi, "", InsertPos); PreInc->takeName(PN); PN->replaceAllUsesWith(PreInc); } |