summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index 6c22d1c0cec..1536e8a5624 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -31,12 +31,12 @@ BenchmarkRunner::BenchmarkRunner(const LLVMState &State,
BenchmarkRunner::~BenchmarkRunner() = default;
-// Repeat the snippet until there are at least NumInstructions in the resulting
+// Repeat the snippet until there are at least MinInstructions in the resulting
// code.
static std::vector<llvm::MCInst>
-GenerateInstructions(const BenchmarkCode &BC, const int MinInstructions) {
+GenerateInstructions(const BenchmarkCode &BC, const size_t MinInstructions) {
std::vector<llvm::MCInst> Code = BC.Instructions;
- for (int I = 0; I < MinInstructions; ++I)
+ for (int I = 0; Code.size() < MinInstructions; ++I)
Code.push_back(BC.Instructions[I % BC.Instructions.size()]);
return Code;
}
OpenPOWER on IntegriCloud