mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -393,17 +393,14 @@ static void MoveBelowOrigChain(SelectionDAG *CurDAG, SDValue Load,
|
||||
Ops.clear();
|
||||
Ops.push_back(NewChain);
|
||||
}
|
||||
for (unsigned i = 1, e = OrigChain.getNumOperands(); i != e; ++i)
|
||||
Ops.push_back(OrigChain.getOperand(i));
|
||||
Ops.append(OrigChain->op_begin() + 1, OrigChain->op_end());
|
||||
CurDAG->UpdateNodeOperands(OrigChain.getNode(), Ops);
|
||||
CurDAG->UpdateNodeOperands(Load.getNode(), Call.getOperand(0),
|
||||
Load.getOperand(1), Load.getOperand(2));
|
||||
|
||||
unsigned NumOps = Call.getNode()->getNumOperands();
|
||||
Ops.clear();
|
||||
Ops.push_back(SDValue(Load.getNode(), 1));
|
||||
for (unsigned i = 1, e = NumOps; i != e; ++i)
|
||||
Ops.push_back(Call.getOperand(i));
|
||||
Ops.append(Call->op_begin() + 1, Call->op_end());
|
||||
CurDAG->UpdateNodeOperands(Call.getNode(), Ops);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user