mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Move HexagonMachineScheduler to use the subtarget off of the
MachineFunction and update all uses accordingly including VLIWResourceModel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
848278638c
commit
b1427d95e2
@ -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…
x
Reference in New Issue
Block a user