OSDN Git Service

[llvm-mca] Removed unused argument from cycleEvent. NFC
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 12 Apr 2018 10:49:40 +0000 (10:49 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 12 Apr 2018 10:49:40 +0000 (10:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329895 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-mca/Backend.cpp
tools/llvm-mca/Dispatch.h
tools/llvm-mca/DispatchStatistics.h
tools/llvm-mca/HWEventListener.h
tools/llvm-mca/RetireControlUnitStatistics.h
tools/llvm-mca/Scheduler.cpp
tools/llvm-mca/Scheduler.h
tools/llvm-mca/SchedulerStatistics.h
tools/llvm-mca/SummaryView.h
tools/llvm-mca/TimelineView.h

index d0afa45..dbe2012 100644 (file)
@@ -52,10 +52,10 @@ void Backend::runCycle(unsigned Cycle) {
 void Backend::notifyCycleBegin(unsigned Cycle) {
   DEBUG(dbgs() << "[E] Cycle begin: " << Cycle << '\n');
   for (HWEventListener *Listener : Listeners)
-    Listener->onCycleBegin(Cycle);
+    Listener->onCycleBegin();
 
-  DU->cycleEvent(Cycle);
-  HWS->cycleEvent(Cycle);
+  DU->cycleEvent();
+  HWS->cycleEvent();
 }
 
 void Backend::notifyInstructionEvent(const HWInstructionEvent &Event) {
@@ -88,6 +88,6 @@ void Backend::notifyReleasedBuffers(ArrayRef<unsigned> Buffers) {
 void Backend::notifyCycleEnd(unsigned Cycle) {
   DEBUG(dbgs() << "[E] Cycle end: " << Cycle << "\n\n");
   for (HWEventListener *Listener : Listeners)
-    Listener->onCycleEnd(Cycle);
+    Listener->onCycleEnd();
 }
 } // namespace mca.
index 3f09ab7..c08515d 100644 (file)
@@ -289,7 +289,7 @@ public:
     return RAT->collectWrites(Vec, RegID);
   }
 
-  void cycleEvent(unsigned Cycle) {
+  void cycleEvent() {
     RCU->cycleEvent();
     AvailableEntries =
         CarryOver >= DispatchWidth ? 0 : DispatchWidth - CarryOver;
index 220ed84..941dcb2 100644 (file)
@@ -67,9 +67,9 @@ public:
 
   void onInstructionEvent(const HWInstructionEvent &Event) override;
 
-  void onCycleBegin(unsigned Cycle) override { NumCycles++; }
+  void onCycleBegin() override { NumCycles++; }
 
-  void onCycleEnd(unsigned Cycle) override { updateHistograms(); }
+  void onCycleEnd() override { updateHistograms(); }
 
   void onStallEvent(const HWStallEvent &Event) override;
 
index f6f5fc6..4b58115 100644 (file)
@@ -116,8 +116,8 @@ public:
 class HWEventListener {
 public:
   // Generic events generated by the backend pipeline.
-  virtual void onCycleBegin(unsigned Cycle) {}
-  virtual void onCycleEnd(unsigned Cycle) {}
+  virtual void onCycleBegin() {}
+  virtual void onCycleEnd() {}
 
   virtual void onInstructionEvent(const HWInstructionEvent &Event) {}
   virtual void onStallEvent(const HWStallEvent &Event) {}
index f3952ab..0d4d11f 100644 (file)
@@ -50,9 +50,9 @@ public:
 
   void onInstructionEvent(const HWInstructionEvent &Event) override;
 
-  void onCycleBegin(unsigned Cycle) override { NumCycles++; }
+  void onCycleBegin() override { NumCycles++; }
 
-  void onCycleEnd(unsigned Cycle) override { updateHistograms(); }
+  void onCycleEnd() override { updateHistograms(); }
 
   void printView(llvm::raw_ostream &OS) const override;
 };
index 6d746cb..8f05138 100644 (file)
@@ -284,7 +284,7 @@ void Scheduler::scheduleInstruction(unsigned Idx, Instruction &MCIS) {
   ReadyQueue[Idx] = &MCIS;
 }
 
-void Scheduler::cycleEvent(unsigned /* unused */) {
+void Scheduler::cycleEvent() {
   SmallVector<ResourceRef, 8> ResourcesFreed;
   Resources->cycleEvent(ResourcesFreed);
 
index 9f9422c..f273220 100644 (file)
@@ -464,7 +464,7 @@ public:
   bool canBeDispatched(unsigned Idx, const InstrDesc &Desc) const;
   void scheduleInstruction(unsigned Idx, Instruction &MCIS);
 
-  void cycleEvent(unsigned Cycle);
+  void cycleEvent();
 
 #ifndef NDEBUG
   void dump() const;
index 6324115..bbb7535 100644 (file)
@@ -69,9 +69,9 @@ public:
 
   void onInstructionEvent(const HWInstructionEvent &Event) override;
 
-  void onCycleBegin(unsigned Cycle) override { NumCycles++; }
+  void onCycleBegin() override { NumCycles++; }
 
-  void onCycleEnd(unsigned Cycle) override { updateHistograms(); }
+  void onCycleEnd() override { updateHistograms(); }
 
   // Increases the number of used scheduler queue slots of every buffered
   // resource in the Buffers set.
index 083e6b0..9c54351 100644 (file)
@@ -45,7 +45,7 @@ public:
   SummaryView(const SourceMgr &S, unsigned Width)
       : Source(S), DispatchWidth(Width), TotalCycles(0) {}
 
-  void onCycleEnd(unsigned /* unused */) override { ++TotalCycles; }
+  void onCycleEnd() override { ++TotalCycles; }
 
   void printView(llvm::raw_ostream &OS) const override;
 };
index 3ee4486..6ec373d 100644 (file)
@@ -162,7 +162,7 @@ public:
   }
 
   // Event handlers.
-  void onCycleBegin(unsigned Cycle) override { CurrentCycle = Cycle; }
+  void onCycleEnd() override { ++CurrentCycle; }
   void onInstructionEvent(const HWInstructionEvent &Event) override;
 
   // print functionalities.