summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca/Scheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mca/Scheduler.h')
-rw-r--r--llvm/tools/llvm-mca/Scheduler.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/Scheduler.h
index 7bc28739746..81daaa72c15 100644
--- a/llvm/tools/llvm-mca/Scheduler.h
+++ b/llvm/tools/llvm-mca/Scheduler.h
@@ -24,6 +24,8 @@
namespace mca {
class Backend;
+class DispatchUnit;
+
/// Used to notify the internal state of a processor resource.
///
/// A processor resource is available if it is not reserved, and there are
@@ -455,7 +457,10 @@ class Scheduler {
std::unique_ptr<LSUnit> LSU;
// The Backend gets notified when instructions are ready/issued/executed.
- Backend *Owner;
+ Backend *const Owner;
+
+ // The dispatch unit gets notified when instructions are executed.
+ DispatchUnit *DU;
using QueueEntryTy = std::pair<unsigned, Instruction *>;
std::map<unsigned, Instruction *> WaitQueue;
@@ -486,6 +491,8 @@ public:
AssumeNoAlias)),
Owner(B) {}
+ void setDispatchUnit(DispatchUnit *DispUnit) { DU = DispUnit; }
+
/// Scheduling events.
///
/// The DispatchUnit is responsible for querying the Scheduler before
OpenPOWER on IntegriCloud