mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user