mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
MIsched: HazardRecognizers are created for each DAG. Free them.
llvm-svn: 175067
This commit is contained in:
parent
0a3102166e
commit
4cce0af4e9
@ -1054,6 +1054,9 @@ public:
|
||||
#endif
|
||||
|
||||
void reset() {
|
||||
// A new HazardRec is created for each DAG and owned by SchedBoundary.
|
||||
delete HazardRec;
|
||||
|
||||
Available.clear();
|
||||
Pending.clear();
|
||||
CheckPending = false;
|
||||
@ -1079,7 +1082,8 @@ public:
|
||||
/// PendingFlag set.
|
||||
SchedBoundary(unsigned ID, const Twine &Name):
|
||||
DAG(0), SchedModel(0), Rem(0), Available(ID, Name+".A"),
|
||||
Pending(ID << ConvergingScheduler::LogMaxQID, Name+".P") {
|
||||
Pending(ID << ConvergingScheduler::LogMaxQID, Name+".P"),
|
||||
HazardRec(0) {
|
||||
reset();
|
||||
}
|
||||
|
||||
@ -1223,6 +1227,7 @@ void ConvergingScheduler::initialize(ScheduleDAGMI *dag) {
|
||||
DAG = dag;
|
||||
SchedModel = DAG->getSchedModel();
|
||||
TRI = DAG->TRI;
|
||||
|
||||
Rem.init(DAG, SchedModel);
|
||||
Top.init(DAG, SchedModel, &Rem);
|
||||
Bot.init(DAG, SchedModel, &Rem);
|
||||
|
@ -192,6 +192,7 @@ void ConvergingVLIWScheduler::initialize(ScheduleDAGMI *dag) {
|
||||
DAG = static_cast<VLIWMachineScheduler*>(dag);
|
||||
SchedModel = DAG->getSchedModel();
|
||||
TRI = DAG->TRI;
|
||||
|
||||
Top.init(DAG, SchedModel);
|
||||
Bot.init(DAG, SchedModel);
|
||||
|
||||
@ -199,6 +200,8 @@ void ConvergingVLIWScheduler::initialize(ScheduleDAGMI *dag) {
|
||||
// are disabled, then these HazardRecs will be disabled.
|
||||
const InstrItineraryData *Itin = DAG->getSchedModel()->getInstrItineraries();
|
||||
const TargetMachine &TM = DAG->MF.getTarget();
|
||||
delete Top.HazardRec;
|
||||
delete Bot.HazardRec;
|
||||
Top.HazardRec = TM.getInstrInfo()->CreateTargetMIHazardRecognizer(Itin, DAG);
|
||||
Bot.HazardRec = TM.getInstrInfo()->CreateTargetMIHazardRecognizer(Itin, DAG);
|
||||
|
||||
@ -683,4 +686,3 @@ void ConvergingVLIWScheduler::schedNode(SUnit *SU, bool IsTopNode) {
|
||||
Bot.bumpNode(SU);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user