[llvm] 866c587 - [NFC][exegesis] `SnippetGenerator::generateConfigurations()`: don't forget to `reserve()`
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 10:39:44 PST 2023
Author: Roman Lebedev
Date: 2023-01-05T21:39:04+03:00
New Revision: 866c587af3be956450556cd3c8399cfcf9f9bde6
URL: https://github.com/llvm/llvm-project/commit/866c587af3be956450556cd3c8399cfcf9f9bde6
DIFF: https://github.com/llvm/llvm-project/commit/866c587af3be956450556cd3c8399cfcf9f9bde6.diff
LOG: [NFC][exegesis] `SnippetGenerator::generateConfigurations()`: don't forget to `reserve()`
Added:
Modified:
llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp b/llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
index b80abf73cf47b..4b47be085e656 100644
--- a/llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
+++ b/llvm/tools/llvm-exegesis/lib/SnippetGenerator.cpp
@@ -75,6 +75,7 @@ Error SnippetGenerator::generateConfigurations(
{
BenchmarkCode BC;
BC.Info = CT.Info;
+ BC.Key.Instructions.reserve(CT.Instructions.size());
for (InstructionTemplate &IT : CT.Instructions) {
if (auto error = randomizeUnsetVariables(State, ForbiddenRegs, IT))
return error;
More information about the llvm-commits
mailing list