[llvm-mca] Introduce the ExecuteStage (was originally the Scheduler class).
Summary: This patch transforms the Scheduler class into the ExecuteStage. Most of the logic remains.
Reviewers: andreadb, RKSimon, courbet
Reviewed By: andreadb
Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D47246
llvm-svn: 334679
diff --git a/llvm/tools/llvm-mca/Backend.cpp b/llvm/tools/llvm-mca/Backend.cpp
index dc2b1de..3e7a365 100644
--- a/llvm/tools/llvm-mca/Backend.cpp
+++ b/llvm/tools/llvm-mca/Backend.cpp
@@ -41,14 +41,13 @@
InstRef IR;
Retire->preExecute(IR);
Dispatch->preExecute(IR);
-
- // This will execute scheduled instructions.
- HWS->cycleEvent(); // TODO: This will eventually be stage-ified.
+ Execute->preExecute(IR);
// Fetch instructions and dispatch them to the hardware.
while (Fetch->execute(IR)) {
if (!Dispatch->execute(IR))
break;
+ Execute->execute(IR);
Fetch->postExecute(IR);
}