[PATCH] D57647: [llvm-exegesis] Throughput support in analysis mode

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 01:12:41 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL353023: [llvm-exegesis] Throughput support in analysis mode (authored by lebedevri, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D57647?vs=184939&id=185001#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57647/new/

https://reviews.llvm.org/D57647

Files:
  llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp


Index: llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
+++ llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
@@ -316,6 +316,7 @@
         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 @@
       }
       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 @@
                                        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>";
@@ -540,6 +546,12 @@
       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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57647.185001.patch
Type: text/x-patch
Size: 2374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190204/72994b6b/attachment.bin>


More information about the llvm-commits mailing list