diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-17 15:29:18 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-17 15:29:18 +0000 |
commit | 6cd780ff2143656df213359b7a6df9a5a9237e17 (patch) | |
tree | b3689d2b8496e1cc569d85b5c59b0ac1d68beace /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 2ba8778157390981ba1e4a3b683aee09aa9f009f (diff) | |
download | bcm5719-llvm-6cd780ff2143656df213359b7a6df9a5a9237e17.tar.gz bcm5719-llvm-6cd780ff2143656df213359b7a6df9a5a9237e17.zip |
Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop.
llvm-svn: 229500
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 4c26d370030..139ba3b58e7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -7264,8 +7264,7 @@ void SelectionDAGBuilder::visitPatchpoint(ImmutableCallSite CS, // Push the arguments from the call instruction up to the register mask. SDNode::op_iterator e = HasGlue ? Call->op_end()-2 : Call->op_end()-1; - for (SDNode::op_iterator i = Call->op_begin()+2; i != e; ++i) - Ops.push_back(*i); + Ops.append(Call->op_begin() + 2, e); // Push live variables for the stack map. addStackMapLiveVars(CS, NumMetaOpers + NumArgs, Ops, *this); |