writeLatencySnippetHtml(OS, Point.Key.Instructions, *InstrInfo_);
break;
case InstructionBenchmark::Uops:
+ case InstructionBenchmark::InverseThroughput:
writeUopsSnippetHtml(OS, Point.Key.Instructions, *InstrInfo_);
break;
default:
}
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);
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>✔</td>";
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) {