summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-06-07 00:04:30 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-06-07 00:04:30 +0000
commit0efc78257b56d2ba45127e1a3f18b524a1c3dd57 (patch)
tree40760cac1bc5f033323f8f24af4082f7952aa15b /utils
parent7f155d7d2bb8c702ed0f64393e38ec1cc26e2f08 (diff)
downloadllvm-0efc78257b56d2ba45127e1a3f18b524a1c3dd57.tar.gz
llvm-0efc78257b56d2ba45127e1a3f18b524a1c3dd57.tar.bz2
llvm-0efc78257b56d2ba45127e1a3f18b524a1c3dd57.tar.xz
CodeGenSchedule: Use resize instead of copying a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenSchedule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenSchedule.cpp b/utils/TableGen/CodeGenSchedule.cpp
index 53b72d03b5..da16852df5 100644
--- a/utils/TableGen/CodeGenSchedule.cpp
+++ b/utils/TableGen/CodeGenSchedule.cpp
@@ -1173,8 +1173,8 @@ pushVariant(const TransVariant &VInfo, bool IsRead) {
// Make N-1 copies of this transition's last sequence.
for (unsigned i = 1, e = SelectedRWs.size(); i != e; ++i) {
// Create a temporary copy the vector could reallocate.
- SmallVector<unsigned, 4> Tmp = RWSequences[OperIdx];
- RWSequences.push_back(Tmp);
+ RWSequences.reserve(RWSequences.size() + 1);
+ RWSequences.push_back(RWSequences[OperIdx]);
}
// Push each of the N elements of the SelectedRWs onto a copy of the last
// sequence (split the current operand into N operands).