summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenSchedule.cpp
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
commitf84a03a589acadcbf07d1c4a92f132268781e674 (patch)
tree3f7d1d86688718696aeb333a922f944b5196aa31 /llvm/utils/TableGen/CodeGenSchedule.cpp
parenta30936a33bade82172be031d42254980a0b57a62 (diff)
downloadbcm5719-llvm-f84a03a589acadcbf07d1c4a92f132268781e674.tar.gz
bcm5719-llvm-f84a03a589acadcbf07d1c4a92f132268781e674.zip
CodeGenSchedule: Use resize instead of copying a vector
llvm-svn: 183465
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index 53b72d03b5b..da16852df55 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/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).
OpenPOWER on IntegriCloud