[llvm] r336983 - [llvm-mca] Removed unused arguments from methods in class Pipeline. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 13 02:27:34 PDT 2018
Author: adibiagio
Date: Fri Jul 13 02:27:34 2018
New Revision: 336983
URL: http://llvm.org/viewvc/llvm-project?rev=336983&view=rev
Log:
[llvm-mca] Removed unused arguments from methods in class Pipeline. NFC
Modified:
llvm/trunk/tools/llvm-mca/Pipeline.cpp
llvm/trunk/tools/llvm-mca/Pipeline.h
Modified: llvm/trunk/tools/llvm-mca/Pipeline.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Pipeline.cpp?rev=336983&r1=336982&r2=336983&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Pipeline.cpp (original)
+++ llvm/trunk/tools/llvm-mca/Pipeline.cpp Fri Jul 13 02:27:34 2018
@@ -58,13 +58,15 @@ void Pipeline::postExecuteStages(const I
}
void Pipeline::run() {
- while (hasWorkToProcess())
- runCycle(Cycles++);
+ while (hasWorkToProcess()) {
+ notifyCycleBegin();
+ runCycle();
+ notifyCycleEnd();
+ ++Cycles;
+ }
}
-void Pipeline::runCycle(unsigned Cycle) {
- notifyCycleBegin(Cycle);
-
+void Pipeline::runCycle() {
// Update the stages before we do any processing for this cycle.
InstRef IR;
for (auto &S : Stages)
@@ -81,18 +83,16 @@ void Pipeline::runCycle(unsigned Cycle)
for (auto &S : Stages)
S->cycleEnd();
-
- notifyCycleEnd(Cycle);
}
-void Pipeline::notifyCycleBegin(unsigned Cycle) {
- LLVM_DEBUG(dbgs() << "[E] Cycle begin: " << Cycle << '\n');
+void Pipeline::notifyCycleBegin() {
+ LLVM_DEBUG(dbgs() << "[E] Cycle begin: " << Cycles << '\n');
for (HWEventListener *Listener : Listeners)
Listener->onCycleBegin();
}
-void Pipeline::notifyCycleEnd(unsigned Cycle) {
- LLVM_DEBUG(dbgs() << "[E] Cycle end: " << Cycle << "\n\n");
+void Pipeline::notifyCycleEnd() {
+ LLVM_DEBUG(dbgs() << "[E] Cycle end: " << Cycles << "\n\n");
for (HWEventListener *Listener : Listeners)
Listener->onCycleEnd();
}
Modified: llvm/trunk/tools/llvm-mca/Pipeline.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Pipeline.h?rev=336983&r1=336982&r2=336983&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Pipeline.h (original)
+++ llvm/trunk/tools/llvm-mca/Pipeline.h Fri Jul 13 02:27:34 2018
@@ -62,8 +62,11 @@ class Pipeline {
void preExecuteStages(const InstRef &IR);
bool executeStages(InstRef &IR);
void postExecuteStages(const InstRef &IR);
+ void runCycle();
+
bool hasWorkToProcess();
- void runCycle(unsigned Cycle);
+ void notifyCycleBegin();
+ void notifyCycleEnd();
public:
Pipeline(unsigned DispatchWidth = 0, unsigned RegisterFileSize = 0,
@@ -73,8 +76,6 @@ public:
void appendStage(std::unique_ptr<Stage> S) { Stages.push_back(std::move(S)); }
void run();
void addEventListener(HWEventListener *Listener);
- void notifyCycleBegin(unsigned Cycle);
- void notifyCycleEnd(unsigned Cycle);
};
} // namespace mca
More information about the llvm-commits
mailing list