[llvm] bb37cab - [llvm-exegesis][NFC] Update benchmark phase naming to match documentation
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 05:41:10 PST 2023
Author: Guillaume Chatelet
Date: 2023-01-06T13:40:46Z
New Revision: bb37cab8a564c0ee1a764e5464f7c8f41a86e504
URL: https://github.com/llvm/llvm-project/commit/bb37cab8a564c0ee1a764e5464f7c8f41a86e504
DIFF: https://github.com/llvm/llvm-project/commit/bb37cab8a564c0ee1a764e5464f7c8f41a86e504.diff
LOG: [llvm-exegesis][NFC] Update benchmark phase naming to match documentation
Added:
Modified:
llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
llvm/tools/llvm-exegesis/llvm-exegesis.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index e71461b50a624..a2a8095f429f9 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 9bd38e11c33b0..cc53b00ca631f 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<object::ObjectFile> &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 d0fb76ffc2a3e..5846242414b83 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -122,14 +122,14 @@ static cl::opt<exegesis::BenchmarkPhaseSelectorE> 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 "
More information about the llvm-commits
mailing list