aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-exegesis/lib/Analysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Analysis.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Analysis.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
index 47afa8c..158fbfe3 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
@@ -316,6 +316,7 @@ void Analysis::printSchedClassClustersHtml(
writeLatencySnippetHtml(OS, Point.Key.Instructions, *InstrInfo_);
break;
case InstructionBenchmark::Uops:
+ case InstructionBenchmark::InverseThroughput:
writeUopsSnippetHtml(OS, Point.Key.Instructions, *InstrInfo_);
break;
default:
@@ -507,9 +508,14 @@ bool Analysis::SchedClassCluster::measurementsMatch(
}
ClusterCenterPoint[I].PerInstructionValue = Representative[I].avg();
}
+ } else if (Mode == InstructionBenchmark::InverseThroughput) {
+ for (int I = 0, E = Representative.size(); I < E; ++I) {
+ SchedClassPoint[I].PerInstructionValue =
+ MCSchedModel::getReciprocalThroughput(STI, *RSC.SCDesc);
+ ClusterCenterPoint[I].PerInstructionValue = Representative[I].min();
+ }
} else {
- llvm::errs() << "unimplemented measurement matching for mode " << Mode
- << "\n";
+ llvm_unreachable("unimplemented measurement matching mode");
return false;
}
return Clustering.isNeighbour(ClusterCenterPoint, SchedClassPoint);
@@ -519,9 +525,9 @@ void Analysis::printSchedClassDescHtml(const ResolvedSchedClass &RSC,
llvm::raw_ostream &OS) const {
OS << "<table class=\"sched-class-desc\">";
OS << "<tr><th>Valid</th><th>Variant</th><th>NumMicroOps</th><th>Latency</"
- "th><th>WriteProcRes</th><th title=\"This is the idealized unit "
- "resource (port) pressure assuming ideal distribution\">Idealized "
- "Resource Pressure</th></tr>";
+ "th><th>RThroughput</th><th>WriteProcRes</th><th title=\"This is the "
+ "idealized unit resource (port) pressure assuming ideal "
+ "distribution\">Idealized Resource Pressure</th></tr>";
if (RSC.SCDesc->isValid()) {
const auto &SM = SubtargetInfo_->getSchedModel();
OS << "<tr><td>&#10004;</td>";
@@ -540,6 +546,12 @@ void Analysis::printSchedClassDescHtml(const ResolvedSchedClass &RSC,
OS << "</li>";
}
OS << "</ul></td>";
+ // inverse throughput.
+ OS << "<td>";
+ writeMeasurementValue<kEscapeHtml>(
+ OS,
+ MCSchedModel::getReciprocalThroughput(*SubtargetInfo_, *RSC.SCDesc));
+ OS << "</td>";
// WriteProcRes.
OS << "<td><ul>";
for (const auto &WPR : RSC.NonRedundantWriteProcRes) {