mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Move SCEVExpander::visitAddExpr out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfeb6a4506
commit
e24fa64d52
@ -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