diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h index e71461b50a624f..a2a8095f429f9d 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h @@ -35,9 +35,9 @@ class Error; namespace exegesis { enum class BenchmarkPhaseSelectorE { - StopBeforeAllCodegen, - StopBeforeFullCodegen, - StopBeforeMeasurements, + PrepareSnippet, + PrepareAndAssembleSnippet, + AssembleMeasuredCode, Measure, }; diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp index 9bd38e11c33b05..cc53b00ca631f9 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp @@ -170,7 +170,7 @@ BenchmarkRunner::getRunnableConfiguration( // Assemble at least kMinInstructionsForSnippet instructions by repeating // the snippet for debug/analysis. This is so that the user clearly // understands that the inside instructions are repeated. - if (BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::StopBeforeAllCodegen) { + if (BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::PrepareSnippet) { const int MinInstructionsForSnippet = 4 * Instructions.size(); const int LoopBodySizeForSnippet = 2 * Instructions.size(); auto Snippet = assembleSnippet(BC, Repetitor, MinInstructionsForSnippet, @@ -185,7 +185,7 @@ BenchmarkRunner::getRunnableConfiguration( // Assemble NumRepetitions instructions repetitions of the snippet for // measurements. - if (BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::StopBeforeFullCodegen) { + if (BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::PrepareAndAssembleSnippet) { auto Snippet = assembleSnippet(BC, Repetitor, InstrBenchmark.NumRepetitions, LoopBodySize); if (Error E = Snippet.takeError()) @@ -203,7 +203,7 @@ BenchmarkRunner::runConfiguration(RunnableConfiguration &&RC, object::OwningBinary &ObjectFile = RC.ObjectFile; if (DumpObjectToDisk && - BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::StopBeforeFullCodegen) { + BenchmarkPhaseSelector > BenchmarkPhaseSelectorE::PrepareAndAssembleSnippet) { auto ObjectFilePath = writeObjectFile(ObjectFile.getBinary()->getData()); if (Error E = ObjectFilePath.takeError()) { InstrBenchmark.Error = toString(std::move(E)); diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp index d0fb76ffc2a3ed..5846242414b835 100644 --- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp +++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp @@ -122,14 +122,14 @@ static cl::opt BenchmarkPhaseSelector( "it is possible to stop the benchmarking process after some phase"), cl::cat(BenchmarkOptions), cl::values( - clEnumValN(exegesis::BenchmarkPhaseSelectorE::StopBeforeAllCodegen, + clEnumValN(exegesis::BenchmarkPhaseSelectorE::PrepareSnippet, "prepare-snippet", "Only generate the minimal instruction sequence"), - clEnumValN(exegesis::BenchmarkPhaseSelectorE::StopBeforeFullCodegen, + clEnumValN(exegesis::BenchmarkPhaseSelectorE::PrepareAndAssembleSnippet, "prepare-and-assemble-snippet", "Same as prepare-snippet, but also dumps an excerpt of the " "sequence (hex encoded)"), - clEnumValN(exegesis::BenchmarkPhaseSelectorE::StopBeforeMeasurements, + clEnumValN(exegesis::BenchmarkPhaseSelectorE::AssembleMeasuredCode, "assemble-measured-code", "Same as prepare-and-assemble-snippet, but also creates the " "full sequence "