summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/RetireControlUnit.cpp
diff options
context:
space:
mode:
authorMatt Davis <Matthew.Davis@sony.com>2018-05-17 19:22:29 +0000
committerMatt Davis <Matthew.Davis@sony.com>2018-05-17 19:22:29 +0000
commit679083e3d8794726d7320cfb7ecb1bbde8cd762d (patch)
treeaf957edbe57c9246636e1e66e039d9f892c721a2 /llvm/tools/llvm-mca/RetireControlUnit.cpp
parented58fed9ef3f79d81427ef973d56f89187d1924c (diff)
downloadbcm5719-llvm-679083e3d8794726d7320cfb7ecb1bbde8cd762d.tar.gz
bcm5719-llvm-679083e3d8794726d7320cfb7ecb1bbde8cd762d.zip
[llvm-mca] Make Dispatch a subclass of Stage.
Summary: The logic of dispatch remains the same, but now DispatchUnit is a Stage (DispatchStage). This change has the benefit of simplifying the backend runCycle() code. The same logic applies, but it belongs to different components now. This is just a start, eventually we will need to remove the call to the DispatchStage in Scheduler.cpp, but that will be a separate patch. This change is mostly a renaming and moving of existing logic. This change also encouraged me to remove the Subtarget (STI) member from the Backend class. That member was used to initialize the other members of Backend and to eventually call DispatchUnit::dispatch(). Now that we have Stages, we can eliminate this by instantiating the DispatchStage with everything it needs at the time of construction (e.g., Subtarget). That change allows us to call DispatchStage::execute(IR) as we expect to call execute() for all other stages. Once we add the Stage list (D46907) we can more cleanly call preExecute() on all of the stages, DispatchStage, will probably wrap cycleEvent() in that case. Made some formatting and minor cleanups to README.txt. Some of the text was re-flowed to stay within 80 cols. Reviewers: andreadb, courbet, RKSimon Reviewed By: andreadb, courbet Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D46983 llvm-svn: 332652
Diffstat (limited to 'llvm/tools/llvm-mca/RetireControlUnit.cpp')
-rw-r--r--llvm/tools/llvm-mca/RetireControlUnit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mca/RetireControlUnit.cpp b/llvm/tools/llvm-mca/RetireControlUnit.cpp
index d28c69b9a48..3ce7e3e2cc1 100644
--- a/llvm/tools/llvm-mca/RetireControlUnit.cpp
+++ b/llvm/tools/llvm-mca/RetireControlUnit.cpp
@@ -12,8 +12,8 @@
///
//===----------------------------------------------------------------------===//
-#include "Dispatch.h"
#include "RetireControlUnit.h"
+#include "DispatchStage.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
@@ -23,9 +23,9 @@ using namespace llvm;
namespace mca {
RetireControlUnit::RetireControlUnit(const llvm::MCSchedModel &SM,
- DispatchUnit *DU)
+ DispatchStage *DS)
: NextAvailableSlotIdx(0), CurrentInstructionSlotIdx(0),
- AvailableSlots(SM.MicroOpBufferSize), MaxRetirePerCycle(0), Owner(DU) {
+ AvailableSlots(SM.MicroOpBufferSize), MaxRetirePerCycle(0), Owner(DS) {
// Check if the scheduling model provides extra information about the machine
// processor. If so, then use that information to set the reorder buffer size
// and the maximum number of instructions retired per cycle.
OpenPOWER on IntegriCloud