]> granicus.if.org Git - llvm/commitdiff
[MCA] Remove unused fields from BottleneckAnalysis. NFC
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 31 May 2019 18:01:42 +0000 (18:01 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 31 May 2019 18:01:42 +0000 (18:01 +0000)
This should appease the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362251 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-mca/Views/BottleneckAnalysis.cpp
tools/llvm-mca/Views/BottleneckAnalysis.h
tools/llvm-mca/llvm-mca.cpp

index ea2cb71bae7e1cae9e8ed49ddd1c8134c2801d6d..cde896fbb5fb035dcf34cded05ed575b1955e3a5 100644 (file)
@@ -205,12 +205,10 @@ void DependencyGraph::addDepImpl(SmallVectorImpl<DependencyEdge> &Vec,
 }
 
 BottleneckAnalysis::BottleneckAnalysis(const MCSubtargetInfo &sti,
-                                       MCInstPrinter &Printer,
-                                       ArrayRef<MCInst> Sequence,
-                                       unsigned Executions)
-    : STI(sti), MCIP(Printer), Tracker(STI.getSchedModel()),
-      DG(Sequence.size()), Source(Sequence), Iterations(Executions),
-      TotalCycles(0), PressureIncreasedBecauseOfResources(false),
+                                       ArrayRef<MCInst> Sequence)
+    : STI(sti), Tracker(STI.getSchedModel()), DG(Sequence.size()),
+      Source(Sequence), TotalCycles(0),
+      PressureIncreasedBecauseOfResources(false),
       PressureIncreasedBecauseOfRegisterDependencies(false),
       PressureIncreasedBecauseOfMemoryDependencies(false),
       SeenStallCycles(false), BPI() {}
@@ -356,7 +354,6 @@ void BottleneckAnalysis::printView(raw_ostream &OS) const {
   printBottleneckHints(TempStream);
   TempStream.flush();
   OS << Buffer;
-  LLVM_DEBUG(DG.dump(OS, MCIP));
 }
 
 } // namespace mca.
index c9f4865e960cbebe3831394b718714229a5b0d72..4c4dc193e13797cc31839565f96196c3acd666f0 100644 (file)
@@ -149,7 +149,7 @@ public:
   void dumpMemDeps(raw_ostream &OS) const;
   void dumpResDeps(raw_ostream &OS) const;
 
-  void dump(raw_ostream &OS, llvm::MCInstPrinter &MCIP) const {
+  void dump(raw_ostream &OS, MCInstPrinter &MCIP) const {
     dumpRegDeps(OS, MCIP);
     dumpMemDeps(OS);
     dumpResDeps(OS);
@@ -160,12 +160,10 @@ public:
 /// A view that collects and prints a few performance numbers.
 class BottleneckAnalysis : public View {
   const MCSubtargetInfo &STI;
-  MCInstPrinter &MCIP;
   PressureTracker Tracker;
   DependencyGraph DG;
 
   ArrayRef<MCInst> Source;
-  unsigned Iterations;
   unsigned TotalCycles;
 
   bool PressureIncreasedBecauseOfResources;
@@ -192,15 +190,18 @@ class BottleneckAnalysis : public View {
   void printBottleneckHints(raw_ostream &OS) const;
 
 public:
-  BottleneckAnalysis(const MCSubtargetInfo &STI, MCInstPrinter &MCIP,
-                     ArrayRef<MCInst> Sequence, unsigned Iterations);
+  BottleneckAnalysis(const MCSubtargetInfo &STI, ArrayRef<MCInst> Sequence);
 
   void onCycleEnd() override;
   void onEvent(const HWStallEvent &Event) override { SeenStallCycles = true; }
   void onEvent(const HWPressureEvent &Event) override;
   void onEvent(const HWInstructionEvent &Event) override;
 
-  void printView(llvm::raw_ostream &OS) const override;
+  void printView(raw_ostream &OS) const override;
+
+#ifndef NDEBUG
+  void dump(raw_ostream &OS, MCInstPrinter &MCIP) const { DG.dump(OS, MCIP); }
+#endif
 };
 
 } // namespace mca
index 75886a6b31b38f96875dcb2bb2cdb9384bbfd36b..a875c70e17fe0dac0d1190eac2db6948e3b666e8 100644 (file)
@@ -487,8 +487,7 @@ int main(int argc, char **argv) {
           llvm::make_unique<mca::SummaryView>(SM, Insts, DispatchWidth));
 
     if (EnableBottleneckAnalysis)
-      Printer.addView(llvm::make_unique<mca::BottleneckAnalysis>(
-          *STI, *IP, Insts, S.getNumIterations()));
+      Printer.addView(llvm::make_unique<mca::BottleneckAnalysis>(*STI, Insts));
 
     if (PrintInstructionInfoView)
       Printer.addView(