projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
API changes for class Use size reduction, wave 1.
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
IndVarSimplify.cpp
diff --git
a/lib/Transforms/Scalar/IndVarSimplify.cpp
b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 44c3d78e8f0d0f09e0c1486d3390093d98456e55..43054227aeaece19b73a5a395bf876ecfcd00366 100644
(file)
--- 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.
Value *AddedVal = GEPI->getOperand(1);
// Insert a new integer PHI node into the top of the block.
- PHINode *NewPhi =
new PHINod
e(AddedVal->getType(),
- PN->getName()+".rec", PN);
+ PHINode *NewPhi =
PHINode::Creat
e(AddedVal->getType(),
+
PN->getName()+".rec", PN);
NewPhi->addIncoming(Constant::getNullValue(NewPhi->getType()), Preheader);
// Create the new add instruction.
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;
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);
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 =
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);
}
PreInc->takeName(PN);
PN->replaceAllUsesWith(PreInc);
}