mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 03:06:28 +00:00
Move SCEVExpander::visitAddExpr out-of-line.
llvm-svn: 52464
This commit is contained in:
parent
82f9df016e
commit
606a60ad68
@ -111,15 +111,7 @@ namespace llvm {
|
||||
return CastInst::CreateSExtOrBitCast(V, S->getType(), "tmp.", InsertPt);
|
||||
}
|
||||
|
||||
Value *visitAddExpr(SCEVAddExpr *S) {
|
||||
Value *V = expand(S->getOperand(S->getNumOperands()-1));
|
||||
|
||||
// Emit a bunch of add instructions
|
||||
for (int i = S->getNumOperands()-2; i >= 0; --i)
|
||||
V = InsertBinop(Instruction::Add, V, expand(S->getOperand(i)),
|
||||
InsertPt);
|
||||
return V;
|
||||
}
|
||||
Value *visitAddExpr(SCEVAddExpr *S);
|
||||
|
||||
Value *visitMulExpr(SCEVMulExpr *S);
|
||||
|
||||
|
@ -99,6 +99,16 @@ Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode, Value *LHS,
|
||||
return BinaryOperator::Create(Opcode, LHS, RHS, "tmp", InsertPt);
|
||||
}
|
||||
|
||||
Value *SCEVExpander::visitAddExpr(SCEVAddExpr *S) {
|
||||
Value *V = expand(S->getOperand(S->getNumOperands()-1));
|
||||
|
||||
// Emit a bunch of add instructions
|
||||
for (int i = S->getNumOperands()-2; i >= 0; --i)
|
||||
V = InsertBinop(Instruction::Add, V, expand(S->getOperand(i)),
|
||||
InsertPt);
|
||||
return V;
|
||||
}
|
||||
|
||||
Value *SCEVExpander::visitMulExpr(SCEVMulExpr *S) {
|
||||
int FirstOp = 0; // Set if we should emit a subtract.
|
||||
if (SCEVConstant *SC = dyn_cast<SCEVConstant>(S->getOperand(0)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user