diff options
author | David Green <david.green@arm.com> | 2020-01-14 17:00:32 +0000 |
---|---|---|
committer | David Green <david.green@arm.com> | 2020-01-15 07:21:44 +0000 |
commit | b891490ceb390b9c9ccc93abf08c2c1bec50e340 (patch) | |
tree | 407a579cf54c8a04b894c0817b002131886dc21c | |
parent | 914b551eeed159ba6051852c0aa63a1311ac4e40 (diff) | |
download | bcm5719-llvm-b891490ceb390b9c9ccc93abf08c2c1bec50e340.tar.gz bcm5719-llvm-b891490ceb390b9c9ccc93abf08c2c1bec50e340.zip |
[Scheduler] Adjust interface of CreateTargetMIHazardRecognizer to use ScheduleDAGMI. NFC
All the callers of this function will be ScheduleDAGMI from the
MachineScheduler. This allows us to use the extra info available in
ScheduleDAGMI without resorting to awkward casts.
-rw-r--r-- | llvm/include/llvm/CodeGen/TargetInstrInfo.h | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/TargetInstrInfo.h b/llvm/include/llvm/CodeGen/TargetInstrInfo.h index 5ca6ec0a926..ec3c0a0194f 100644 --- a/llvm/include/llvm/CodeGen/TargetInstrInfo.h +++ b/llvm/include/llvm/CodeGen/TargetInstrInfo.h @@ -52,6 +52,7 @@ class MCInst; struct MCSchedModel; class Module; class ScheduleDAG; +class ScheduleDAGMI; class ScheduleHazardRecognizer; class SDNode; class SelectionDAG; @@ -1370,7 +1371,7 @@ public: /// scheduling the machine instructions before register allocation. virtual ScheduleHazardRecognizer * CreateTargetMIHazardRecognizer(const InstrItineraryData *, - const ScheduleDAG *DAG) const; + const ScheduleDAGMI *DAG) const; /// Allocate and return a hazard recognizer to use for this target when /// scheduling the machine instructions after register allocation. diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index 477f9dd33be..a98c627dab0 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -15,6 +15,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/MachineScheduler.h" #include "llvm/CodeGen/PseudoSourceValue.h" #include "llvm/CodeGen/ScoreboardHazardRecognizer.h" #include "llvm/CodeGen/StackMaps.h" @@ -1015,9 +1016,8 @@ CreateTargetHazardRecognizer(const TargetSubtargetInfo *STI, } // Default implementation of CreateTargetMIHazardRecognizer. -ScheduleHazardRecognizer *TargetInstrInfo:: -CreateTargetMIHazardRecognizer(const InstrItineraryData *II, - const ScheduleDAG *DAG) const { +ScheduleHazardRecognizer *TargetInstrInfo::CreateTargetMIHazardRecognizer( + const InstrItineraryData *II, const ScheduleDAGMI *DAG) const { return new ScoreboardHazardRecognizer(II, DAG, "machine-scheduler"); } |