LLVM  8.0.1
Public Member Functions | List of all members
llvm::MachineSchedStrategy Class Referenceabstract

MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI. More...

#include "llvm/CodeGen/MachineScheduler.h"

Inheritance diagram for llvm::MachineSchedStrategy:
Inheritance graph
[legend]

Public Member Functions

virtual ~MachineSchedStrategy ()=default
 
virtual void initPolicy (MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs)
 Optionally override the per-region scheduling policy. More...
 
virtual void dumpPolicy () const
 
virtual bool shouldTrackPressure () const
 Check if pressure tracking is needed before building the DAG and initializing this strategy. More...
 
virtual bool shouldTrackLaneMasks () const
 Returns true if lanemasks should be tracked. More...
 
virtual bool doMBBSchedRegionsTopDown () const
 
virtual void initialize (ScheduleDAGMI *DAG)=0
 Initialize the strategy after building the DAG for a new region. More...
 
virtual void enterMBB (MachineBasicBlock *MBB)
 Tell the strategy that MBB is about to be processed. More...
 
virtual void leaveMBB ()
 Tell the strategy that current MBB is done. More...
 
virtual void registerRoots ()
 Notify this strategy that all roots have been released (including those that depend on EntrySU or ExitSU). More...
 
virtual SUnitpickNode (bool &IsTopNode)=0
 Pick the next node to schedule, or return NULL. More...
 
virtual void scheduleTree (unsigned SubtreeID)
 Scheduler callback to notify that a new subtree is scheduled. More...
 
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. More...
 
virtual void releaseTopNode (SUnit *SU)=0
 When all predecessor dependencies have been resolved, free this node for top-down scheduling. More...
 
virtual void releaseBottomNode (SUnit *SU)=0
 When all successor dependencies have been resolved, free this node for bottom-up scheduling. More...
 

Detailed Description

MachineSchedStrategy - Interface to the scheduling algorithm used by ScheduleDAGMI.

Initialization sequence: initPolicy -> shouldTrackPressure -> initialize(DAG) -> registerRoots

Definition at line 197 of file MachineScheduler.h.

Constructor & Destructor Documentation

◆ ~MachineSchedStrategy()

virtual llvm::MachineSchedStrategy::~MachineSchedStrategy ( )
virtualdefault

Member Function Documentation

◆ doMBBSchedRegionsTopDown()

virtual bool llvm::MachineSchedStrategy::doMBBSchedRegionsTopDown ( ) const
inlinevirtual

Reimplemented in llvm::SystemZPostRASchedStrategy.

Definition at line 222 of file MachineScheduler.h.

References initialize().

◆ dumpPolicy()

virtual void llvm::MachineSchedStrategy::dumpPolicy ( ) const
inlinevirtual

Reimplemented in llvm::GenericScheduler.

Definition at line 208 of file MachineScheduler.h.

◆ enterMBB()

virtual void llvm::MachineSchedStrategy::enterMBB ( MachineBasicBlock MBB)
inlinevirtual

Tell the strategy that MBB is about to be processed.

Reimplemented in llvm::SystemZPostRASchedStrategy.

Definition at line 228 of file MachineScheduler.h.

◆ initialize()

virtual void llvm::MachineSchedStrategy::initialize ( ScheduleDAGMI DAG)
pure virtual

◆ initPolicy()

virtual void llvm::MachineSchedStrategy::initPolicy ( MachineBasicBlock::iterator  Begin,
MachineBasicBlock::iterator  End,
unsigned  NumRegionInstrs 
)
inlinevirtual

Optionally override the per-region scheduling policy.

Reimplemented in llvm::PostGenericScheduler, llvm::GenericScheduler, and llvm::SystemZPostRASchedStrategy.

Definition at line 204 of file MachineScheduler.h.

◆ leaveMBB()

virtual void llvm::MachineSchedStrategy::leaveMBB ( )
inlinevirtual

Tell the strategy that current MBB is done.

Reimplemented in llvm::SystemZPostRASchedStrategy.

Definition at line 231 of file MachineScheduler.h.

◆ pickNode()

virtual SUnit* llvm::MachineSchedStrategy::pickNode ( bool IsTopNode)
pure virtual

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::PostGenericScheduler, llvm::GenericScheduler, llvm::ConvergingVLIWScheduler, llvm::SystemZPostRASchedStrategy, llvm::R600SchedStrategy, and llvm::GCNMaxOccupancySchedStrategy.

Referenced by llvm::createGenericSchedPostRA(), and createILPMinScheduler().

◆ registerRoots()

virtual void llvm::MachineSchedStrategy::registerRoots ( )
inlinevirtual

Notify this strategy that all roots have been released (including those that depend on EntrySU or ExitSU).

Reimplemented in llvm::PostGenericScheduler, and llvm::GenericScheduler.

Definition at line 235 of file MachineScheduler.h.

Referenced by llvm::createGenericSchedPostRA().

◆ releaseBottomNode()

virtual void llvm::MachineSchedStrategy::releaseBottomNode ( SUnit SU)
pure virtual

When all successor dependencies have been resolved, free this node for bottom-up scheduling.

Implemented in llvm::PostGenericScheduler, llvm::GenericScheduler, llvm::ConvergingVLIWScheduler, llvm::SystemZPostRASchedStrategy, and llvm::R600SchedStrategy.

Referenced by llvm::createGenericSchedPostRA(), and createILPMinScheduler().

◆ releaseTopNode()

virtual void llvm::MachineSchedStrategy::releaseTopNode ( SUnit SU)
pure virtual

When all predecessor dependencies have been resolved, free this node for top-down scheduling.

Implemented in llvm::PostGenericScheduler, llvm::GenericScheduler, llvm::ConvergingVLIWScheduler, llvm::SystemZPostRASchedStrategy, and llvm::R600SchedStrategy.

Referenced by llvm::createGenericSchedPostRA(), and createILPMinScheduler().

◆ schedNode()

virtual void llvm::MachineSchedStrategy::schedNode ( SUnit SU,
bool  IsTopNode 
)
pure virtual

Notify MachineSchedStrategy that ScheduleDAGMI has scheduled an instruction and updated scheduled/remaining flags in the DAG nodes.

Implemented in llvm::PostGenericScheduler, llvm::GenericScheduler, llvm::ConvergingVLIWScheduler, llvm::SystemZPostRASchedStrategy, and llvm::R600SchedStrategy.

Referenced by llvm::createGenericSchedPostRA(), and createILPMinScheduler().

◆ scheduleTree()

virtual void llvm::MachineSchedStrategy::scheduleTree ( unsigned  SubtreeID)
inlinevirtual

Scheduler callback to notify that a new subtree is scheduled.

Reimplemented in llvm::PostGenericScheduler.

Definition at line 243 of file MachineScheduler.h.

Referenced by llvm::createGenericSchedPostRA().

◆ shouldTrackLaneMasks()

virtual bool llvm::MachineSchedStrategy::shouldTrackLaneMasks ( ) const
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 217 of file MachineScheduler.h.

◆ shouldTrackPressure()

virtual bool llvm::MachineSchedStrategy::shouldTrackPressure ( ) const
inlinevirtual

Check if pressure tracking is needed before building the DAG and initializing this strategy.

Called after initPolicy.

Reimplemented in llvm::PostGenericScheduler, llvm::GenericScheduler, and llvm::SystemZPostRASchedStrategy.

Definition at line 212 of file MachineScheduler.h.


The documentation for this class was generated from the following files: