LLVM 20.0.0git
|
A MachineSchedStrategy implementation for SystemZ post RA scheduling. More...
#include "Target/SystemZ/SystemZMachineScheduler.h"
Public Member Functions | |
SystemZPostRASchedStrategy (const MachineSchedContext *C) | |
virtual | ~SystemZPostRASchedStrategy () |
void | initPolicy (MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs) override |
Called for a region before scheduling. | |
bool | shouldTrackPressure () const override |
PostRA scheduling does not track pressure. | |
bool | doMBBSchedRegionsTopDown () const override |
void | initialize (ScheduleDAGMI *dag) override |
Initialize the strategy after building the DAG for a new region. | |
void | enterMBB (MachineBasicBlock *NextMBB) override |
Tell the strategy that MBB is about to be processed. | |
void | leaveMBB () override |
Tell the strategy that current MBB is done. | |
SUnit * | pickNode (bool &IsTopNode) override |
Pick the next node to schedule, or return NULL. | |
void | schedNode (SUnit *SU, bool IsTopNode) override |
ScheduleDAGMI has scheduled an instruction - tell HazardRec about it. | |
void | releaseTopNode (SUnit *SU) override |
SU has had all predecessor dependencies resolved. | |
void | releaseBottomNode (SUnit *SU) override |
Currently only scheduling top-down, so this method is empty. | |
Public Member Functions inherited from llvm::MachineSchedStrategy | |
virtual | ~MachineSchedStrategy ()=default |
virtual void | initPolicy (MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs) |
Optionally override the per-region scheduling policy. | |
virtual void | dumpPolicy () const |
virtual bool | shouldTrackPressure () const |
Check if pressure tracking is needed before building the DAG and initializing this strategy. | |
virtual bool | shouldTrackLaneMasks () const |
Returns true if lanemasks should be tracked. | |
virtual bool | doMBBSchedRegionsTopDown () const |
virtual void | initialize (ScheduleDAGMI *DAG)=0 |
Initialize the strategy after building the DAG for a new region. | |
virtual void | enterMBB (MachineBasicBlock *MBB) |
Tell the strategy that MBB is about to be processed. | |
virtual void | leaveMBB () |
Tell the strategy that current MBB is done. | |
virtual void | registerRoots () |
Notify this strategy that all roots have been released (including those that depend on EntrySU or ExitSU). | |
virtual SUnit * | pickNode (bool &IsTopNode)=0 |
Pick the next node to schedule, or return NULL. | |
virtual void | scheduleTree (unsigned SubtreeID) |
Scheduler callback to notify that a new subtree is scheduled. | |
virtual void | schedNode (SUnit *SU, bool IsTopNode)=0 |
Notify MachineSchedStrategy that ScheduleDAGMI has scheduled an instruction and updated scheduled/remaining flags in the DAG nodes. | |
virtual void | releaseTopNode (SUnit *SU)=0 |
When all predecessor dependencies have been resolved, free this node for top-down scheduling. | |
virtual void | releaseBottomNode (SUnit *SU)=0 |
When all successor dependencies have been resolved, free this node for bottom-up scheduling. | |
A MachineSchedStrategy implementation for SystemZ post RA scheduling.
Definition at line 28 of file SystemZMachineScheduler.h.
SystemZPostRASchedStrategy::SystemZPostRASchedStrategy | ( | const MachineSchedContext * | C | ) |
Definition at line 128 of file SystemZMachineScheduler.cpp.
References llvm::CallingConv::C, and llvm::TargetSchedModel::init().
|
virtual |
Definition at line 138 of file SystemZMachineScheduler.cpp.
References I.
|
inlineoverridevirtual |
Reimplemented from llvm::MachineSchedStrategy.
Definition at line 126 of file SystemZMachineScheduler.h.
|
overridevirtual |
Tell the strategy that MBB is about to be processed.
Create a HazardRec for MBB, save it in SchedStates and set HazardRec to point to it.
Reimplemented from llvm::MachineSchedStrategy.
Definition at line 79 of file SystemZMachineScheduler.cpp.
References assert(), llvm::SystemZHazardRecognizer::copyState(), llvm::dbgs(), llvm::Pass::dump(), llvm::SystemZHazardRecognizer::dumpState(), llvm::SystemZHazardRecognizer::emitInstruction(), llvm::SystemZInstrInfo::getBranchInfo(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::SystemZII::Branch::getMBBTarget(), getSingleSchedPred(), if(), llvm::SystemZII::Branch::isIndirect(), LLVM_DEBUG, MI, and llvm::printMBBReference().
|
overridevirtual |
Initialize the strategy after building the DAG for a new region.
Implements llvm::MachineSchedStrategy.
Definition at line 74 of file SystemZMachineScheduler.cpp.
References llvm::SystemZHazardRecognizer::dumpState(), and LLVM_DEBUG.
|
overridevirtual |
Called for a region before scheduling.
Reimplemented from llvm::MachineSchedStrategy.
Definition at line 146 of file SystemZMachineScheduler.cpp.
|
overridevirtual |
Tell the strategy that current MBB is done.
Reimplemented from llvm::MachineSchedStrategy.
Definition at line 120 of file SystemZMachineScheduler.cpp.
References llvm::dbgs(), llvm::MachineBasicBlock::getFirstTerminator(), LLVM_DEBUG, and llvm::printMBBReference().
Pick the next node to schedule, or return NULL.
Implements llvm::MachineSchedStrategy.
Definition at line 158 of file SystemZMachineScheduler.cpp.
References assert(), llvm::dbgs(), llvm::SystemZHazardRecognizer::dumpSU(), and LLVM_DEBUG.
|
inlineoverridevirtual |
Currently only scheduling top-down, so this method is empty.
Implements llvm::MachineSchedStrategy.
Definition at line 148 of file SystemZMachineScheduler.h.
|
overridevirtual |
SU has had all predecessor dependencies resolved.
Put it into Available.
Implements llvm::MachineSchedStrategy.
Definition at line 251 of file SystemZMachineScheduler.cpp.
References llvm::SystemZHazardRecognizer::getSchedClass(), llvm::SUnit::isScheduleHigh, and llvm::SUnit::isUnbuffered.
ScheduleDAGMI has scheduled an instruction - tell HazardRec about it.
Implements llvm::MachineSchedStrategy.
Definition at line 241 of file SystemZMachineScheduler.cpp.
References llvm::dbgs(), llvm::SystemZHazardRecognizer::EmitInstruction(), if(), LLVM_DEBUG, and llvm::SUnit::NodeNum.
|
inlineoverridevirtual |
PostRA scheduling does not track pressure.
Reimplemented from llvm::MachineSchedStrategy.
Definition at line 122 of file SystemZMachineScheduler.h.