aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2024-02-19 01:21:56 -0800
committerGitHub <noreply@github.com>2024-02-19 01:21:56 -0800
commit63dd08b1f4d2a79c02e57cc0688e40c1ecc7f6cc (patch)
treee9c6457cd70419f92534f0b0044a55a5e005c7ea /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
parent6d7de46155fece05ab5a44aedd573a811f4b208a (diff)
downloadllvm-63dd08b1f4d2a79c02e57cc0688e40c1ecc7f6cc.zip
llvm-63dd08b1f4d2a79c02e57cc0688e40c1ecc7f6cc.tar.gz
llvm-63dd08b1f4d2a79c02e57cc0688e40c1ecc7f6cc.tar.bz2
[llvm-exegesis] Add branch miss validation counter (#81094)
This patch adds a branch miss validation counter so that it is easy to quantify the number of missed branches when using the loop repetition mode.
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index c193a8e..570af6e 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -209,6 +209,8 @@ const char *validationEventToString(exegesis::ValidationEvent VE) {
return "data-tlb-store-misses";
case exegesis::ValidationEvent::InstructionTLBLoadMiss:
return "instruction-tlb-load-misses";
+ case exegesis::ValidationEvent::BranchPredictionMiss:
+ return "branch-prediction-misses";
}
llvm_unreachable("Unhandled exegesis::ValidationEvent enum");
}
@@ -228,6 +230,8 @@ Expected<exegesis::ValidationEvent> stringToValidationEvent(StringRef Input) {
return exegesis::ValidationEvent::DataTLBStoreMiss;
else if (Input == "instruction-tlb-load-misses")
return exegesis::ValidationEvent::InstructionTLBLoadMiss;
+ else if (Input == "branch-prediction-misses")
+ return exegesis::ValidationEvent::BranchPredictionMiss;
else
return make_error<StringError>("Invalid validation event string",
errc::invalid_argument);