forked from OSchip/llvm-project
Move HexagonMachineScheduler to use the subtarget off of the
MachineFunction and update all uses accordingly including VLIWResourceModel. llvm-svn: 227872
This commit is contained in:
parent
d737b76b63
commit
f8b8e4a3fb
|
@ -205,20 +205,17 @@ void ConvergingVLIWScheduler::initialize(ScheduleDAGMI *dag) {
|
|||
// Initialize the HazardRecognizers. If itineraries don't exist, are empty, or
|
||||
// are disabled, then these HazardRecs will be disabled.
|
||||
const InstrItineraryData *Itin = DAG->getSchedModel()->getInstrItineraries();
|
||||
const TargetMachine &TM = DAG->MF.getTarget();
|
||||
const TargetSubtargetInfo &STI = DAG->MF.getSubtarget();
|
||||
const TargetInstrInfo *TII = STI.getInstrInfo();
|
||||
delete Top.HazardRec;
|
||||
delete Bot.HazardRec;
|
||||
Top.HazardRec =
|
||||
TM.getSubtargetImpl()->getInstrInfo()->CreateTargetMIHazardRecognizer(
|
||||
Itin, DAG);
|
||||
Bot.HazardRec =
|
||||
TM.getSubtargetImpl()->getInstrInfo()->CreateTargetMIHazardRecognizer(
|
||||
Itin, DAG);
|
||||
Top.HazardRec = TII->CreateTargetMIHazardRecognizer(Itin, DAG);
|
||||
Bot.HazardRec = TII->CreateTargetMIHazardRecognizer(Itin, DAG);
|
||||
|
||||
delete Top.ResourceModel;
|
||||
delete Bot.ResourceModel;
|
||||
Top.ResourceModel = new VLIWResourceModel(TM, DAG->getSchedModel());
|
||||
Bot.ResourceModel = new VLIWResourceModel(TM, DAG->getSchedModel());
|
||||
Top.ResourceModel = new VLIWResourceModel(STI, DAG->getSchedModel());
|
||||
Bot.ResourceModel = new VLIWResourceModel(STI, DAG->getSchedModel());
|
||||
|
||||
assert((!llvm::ForceTopDown || !llvm::ForceBottomUp) &&
|
||||
"-misched-topdown incompatible with -misched-bottomup");
|
||||
|
|
|
@ -54,11 +54,9 @@ class VLIWResourceModel {
|
|||
unsigned TotalPackets;
|
||||
|
||||
public:
|
||||
VLIWResourceModel(const TargetMachine &TM, const TargetSchedModel *SM) :
|
||||
SchedModel(SM), TotalPackets(0) {
|
||||
ResourcesModel =
|
||||
TM.getSubtargetImpl()->getInstrInfo()->CreateTargetScheduleState(
|
||||
*TM.getSubtargetImpl());
|
||||
VLIWResourceModel(const TargetSubtargetInfo &STI, const TargetSchedModel *SM)
|
||||
: SchedModel(SM), TotalPackets(0) {
|
||||
ResourcesModel = STI.getInstrInfo()->CreateTargetScheduleState(STI);
|
||||
|
||||
// This hard requirement could be relaxed,
|
||||
// but for now do not let it proceed.
|
||||
|
|
Loading…
Reference in New Issue