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
This commit is contained in:
Gabor Greif
2008-04-06 20:25:17 +00:00
parent d963ab1f58
commit 051a950000
73 changed files with 979 additions and 692 deletions

View File

@ -143,7 +143,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
// Create and insert the PHI node for the induction variable in the
// specified loop.
BasicBlock *Header = L->getHeader();
PHINode *PN = new PHINode(Ty, "indvar", Header->begin());
PHINode *PN = PHINode::Create(Ty, "indvar", Header->begin());
PN->addIncoming(Constant::getNullValue(Ty), L->getLoopPreheader());
pred_iterator HPI = pred_begin(Header);
@ -215,7 +215,7 @@ Value *SCEVExpander::visitSMaxExpr(SCEVSMaxExpr *S) {
for (unsigned i = 1; i < S->getNumOperands(); ++i) {
Value *RHS = expand(S->getOperand(i));
Value *ICmp = new ICmpInst(ICmpInst::ICMP_SGT, LHS, RHS, "tmp", InsertPt);
LHS = new SelectInst(ICmp, LHS, RHS, "smax", InsertPt);
LHS = SelectInst::Create(ICmp, LHS, RHS, "smax", InsertPt);
}
return LHS;
}
@ -225,7 +225,7 @@ Value *SCEVExpander::visitUMaxExpr(SCEVUMaxExpr *S) {
for (unsigned i = 1; i < S->getNumOperands(); ++i) {
Value *RHS = expand(S->getOperand(i));
Value *ICmp = new ICmpInst(ICmpInst::ICMP_UGT, LHS, RHS, "tmp", InsertPt);
LHS = new SelectInst(ICmp, LHS, RHS, "umax", InsertPt);
LHS = SelectInst::Create(ICmp, LHS, RHS, "umax", InsertPt);
}
return LHS;
}