summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Analysis.cpp5
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp7
-rw-r--r--llvm/tools/llvm-exegesis/lib/BenchmarkResult.h4
3 files changed, 7 insertions, 9 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
index 54dc4be374b..1da36b245a4 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
@@ -248,10 +248,7 @@ void Analysis::printSchedClassClustersHtml(
for (const auto &Measurement :
Points[Clusters[0].getPointIds()[0]].Measurements) {
OS << "<th>";
- if (Measurement.DebugString.empty())
- writeEscaped<kEscapeHtml>(OS, Measurement.Key);
- else
- writeEscaped<kEscapeHtml>(OS, Measurement.DebugString);
+ writeEscaped<kEscapeHtml>(OS, Measurement.Key);
OS << "</th>";
}
OS << "</tr>";
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index 1748c53479c..a3dd56ca3a2 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -164,10 +164,13 @@ template <> struct SequenceElementTraits<exegesis::BenchmarkMeasure> {
// e.g. { "key": "the key", "value": 0123 }
template <> struct MappingTraits<exegesis::BenchmarkMeasure> {
static void mapping(IO &Io, exegesis::BenchmarkMeasure &Obj) {
- Io.mapOptional("debug_string", Obj.DebugString);
+ Io.mapRequired("key", Obj.Key);
+ if (!Io.outputting()) {
+ // For backward compatibility, interpret debug_string as a key.
+ Io.mapOptional("debug_string", Obj.Key);
+ }
Io.mapRequired("value", Obj.PerInstructionValue);
Io.mapOptional("per_snippet_value", Obj.PerSnippetValue);
- Io.mapRequired("key", Obj.Key);
}
static const bool flow = true;
};
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index 0fcf4e9fe6d..961c07b99dd 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
@@ -43,7 +43,7 @@ struct InstructionBenchmarkKey {
struct BenchmarkMeasure {
// A helper to create an unscaled BenchmarkMeasure.
static BenchmarkMeasure Create(std::string Key, double Value) {
- return {Key, Value, Value, Key};
+ return {Key, Value, Value};
}
std::string Key;
// This is the per-instruction value, i.e. measured quantity scaled per
@@ -52,8 +52,6 @@ struct BenchmarkMeasure {
// This is the per-snippet value, i.e. measured quantity for one repetition of
// the whole snippet.
double PerSnippetValue;
- // FIXME: remove, use `Key` instead.
- std::string DebugString;
};
// The result of an instruction benchmark.
OpenPOWER on IntegriCloud