LLVM 20.0.0git
|
MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI. More...
#include "llvm/CodeGen/MachineScheduler.h"
Public Member Functions | |
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. | |
MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI.
Initialization sequence: initPolicy -> shouldTrackPressure -> initialize(DAG) -> registerRoots
Definition at line 211 of file MachineScheduler.h.
|
virtualdefault |
|
inlinevirtual |
Reimplemented in llvm::SystemZPostRASchedStrategy.
Definition at line 236 of file MachineScheduler.h.
|
inlinevirtual |
Reimplemented in llvm::GenericScheduler.
Definition at line 222 of file MachineScheduler.h.
|
inlinevirtual |
Tell the strategy that MBB is about to be processed.
Reimplemented in llvm::PPCPostRASchedStrategy, and llvm::SystemZPostRASchedStrategy.
Definition at line 242 of file MachineScheduler.h.
Referenced by llvm::PPCPostRASchedStrategy::enterMBB().
|
pure virtual |
Initialize the strategy after building the DAG for a new region.
Implemented in llvm::GenericScheduler, llvm::PostGenericScheduler, llvm::ConvergingVLIWScheduler, llvm::GCNSchedStrategy, llvm::R600SchedStrategy, llvm::PPCPostRASchedStrategy, and llvm::SystemZPostRASchedStrategy.
|
inlinevirtual |
Optionally override the per-region scheduling policy.
Reimplemented in llvm::GenericScheduler, llvm::PostGenericScheduler, and llvm::SystemZPostRASchedStrategy.
Definition at line 218 of file MachineScheduler.h.
|
inlinevirtual |
Tell the strategy that current MBB is done.
Reimplemented in llvm::PPCPostRASchedStrategy, and llvm::SystemZPostRASchedStrategy.
Definition at line 245 of file MachineScheduler.h.
Referenced by llvm::PPCPostRASchedStrategy::leaveMBB().
Pick the next node to schedule, or return NULL.
Set IsTopNode to true to schedule the node at the top of the unscheduled region. Otherwise it will be scheduled at the bottom.
Implemented in llvm::GenericScheduler, llvm::PostGenericScheduler, llvm::ConvergingVLIWScheduler, llvm::GCNSchedStrategy, llvm::R600SchedStrategy, llvm::PPCPostRASchedStrategy, and llvm::SystemZPostRASchedStrategy.
|
inlinevirtual |
Notify this strategy that all roots have been released (including those that depend on EntrySU or ExitSU).
Reimplemented in llvm::GenericScheduler, and llvm::PostGenericScheduler.
Definition at line 249 of file MachineScheduler.h.
|
pure virtual |
When all successor dependencies have been resolved, free this node for bottom-up scheduling.
Implemented in llvm::GenericScheduler, llvm::PostGenericScheduler, llvm::ConvergingVLIWScheduler, llvm::R600SchedStrategy, and llvm::SystemZPostRASchedStrategy.
|
pure virtual |
When all predecessor dependencies have been resolved, free this node for top-down scheduling.
Implemented in llvm::GenericScheduler, llvm::PostGenericScheduler, llvm::ConvergingVLIWScheduler, llvm::R600SchedStrategy, and llvm::SystemZPostRASchedStrategy.
Notify MachineSchedStrategy that ScheduleDAGMI has scheduled an instruction and updated scheduled/remaining flags in the DAG nodes.
Implemented in llvm::GenericScheduler, llvm::PostGenericScheduler, llvm::ConvergingVLIWScheduler, llvm::R600SchedStrategy, and llvm::SystemZPostRASchedStrategy.
|
inlinevirtual |
Scheduler callback to notify that a new subtree is scheduled.
Reimplemented in llvm::PostGenericScheduler.
Definition at line 257 of file MachineScheduler.h.
|
inlinevirtual |
Returns true if lanemasks should be tracked.
LaneMask tracking is necessary to reorder independent subregister defs for the same vreg. This has to be enabled in combination with shouldTrackPressure().
Reimplemented in llvm::GenericScheduler.
Definition at line 231 of file MachineScheduler.h.
|
inlinevirtual |
Check if pressure tracking is needed before building the DAG and initializing this strategy.
Called after initPolicy.
Reimplemented in llvm::GenericScheduler, llvm::PostGenericScheduler, and llvm::SystemZPostRASchedStrategy.
Definition at line 226 of file MachineScheduler.h.