mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
MIsched: HazardRecognizers are created for each DAG. Free them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af7c042af1
commit
ecb8c2ba60
@ -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