ScheduleDAG that schedules according to a MachineSchedStrategy.
Synopsis
Declared in <llvm/CodeGen/MachineScheduler.h>
class ScheduleDAGMI
: public ScheduleDAGInstrs
Description
This is the common functionality between PreRA and PostRA MachineScheduler. It simply schedules machine instructions according to the given strategy without much extra book‐keeping.
Base Classes
Name |
Description |
A ScheduleDAG for scheduling lists of MachineInstr. |
Type Aliases
Name |
Description |
List of SUnits associated with a memory value during DAG construction. |
Enums
Name |
Description |
The direction that should be used to dump the scheduled Sequence. |
Member Functions
Name |
Description |
|
Construct a DAG scheduler for context |
|
Destroy the schedule DAG and owned strategy. |
|
Copy assignment is deleted; ScheduleDAG is passed by reference only. |
IsReachable ‐ Checks if SU is reachable from TargetSU. |
|
Verifies that all SUnits were scheduled and that their state is consistent. Returns the number of scheduled SUnits. |
|
|
Adds custom features for a visualization of the ScheduleDAG. |
Add a DAG edge to the given SU with the given predecessor dependence data. |
|
Add a postprocessing step to the DAG builder. |
|
Adds dependencies from region instructions to the scheduling barrier. |
|
Returns an iterator to the top of the current scheduling region. |
|
Return an iterator to the bottom of the unscheduled zone. |
|
Builds SUnits for the current scheduling region. |
|
True if an edge can be added from PredSU to SuccSU without creating a cycle. |
|
Clears the DAG state (between regions). |
|
|
Return true to process MBB scheduling regions top‐down. |
|
Dumps the scheduling DAG for debugging. |
|
Dumps a single scheduling unit for debugging. |
Dump the printable name of |
|
Returns an iterator to the bottom of the current scheduling region. |
|
|
Prepare the next scheduling region within a basic block. |
|
Called when the scheduler has finished scheduling the current region. |
|
Allow targets to perform final scheduling actions at the level of the whole MachineFunction. By default does nothing. |
|
Finish scheduling for the current basic block. |
Fixes register kill flags that scheduling has made invalid. |
|
Get the specific cluster, return nullptr for InvalidClusterId. |
|
Returns the array of the clusters. |
|
|
Returns a label for the region of code covered by the DAG. |
|
Returns a label for a DAG node that points to an instruction. |
Returns the MCInstrDesc of this SUnit. Returns NULL for SDNodes without a machine opcode. |
|
Return the LiveIntervals instance for use in DAG mutators and such. |
|
Returns an existing SUnit for this MI, or nullptr. |
|
Resolves and cache a resolved scheduling class for an SUnit. |
|
Gets the machine model for instruction scheduling. |
|
|
Return true if this DAG supports VReg liveness and RegPressure. |
Change the position of an instruction within the basic block and update live ranges and region boundary iterators. |
|
Creates a new SUnit and return a ptr to it. |
|
|
Implement ScheduleDAGInstrs interface for scheduling a sequence of reorderable instructions. |
Sets the direction used when dumping the scheduled sequence. |
|
Whether regions with a single MI should be scheduled. |
|
|
Begin scheduling within basic block |
Return an iterator to the top of the unscheduled zone. |
|
|
Data Members
Name |
Description |
Special node for the region entry. |
|
Special node for the region exit. |
|
Machine function |
|
Virtual/real register map |
|
The scheduling units. |
|
When true, stress‐test the scheduler. |
|
Target instruction information |
|
Target processor |
|
Target processor register info |
Protected Types
Name |
Description |
A map from ValueType to SUList, used during DAG construction, as a means of remembering which SUs depend on which memory locations. |
Protected Type Aliases
Name |
Description |
Pairs of DBG_VALUE instructions and the instructions they follow. |
Protected Member Functions
Name |
Description |
Adds barrier‐chain edges from all SUs in |
|
|
|
Adds a chain edge between SUa and SUb, but only if both AAResults and Target fail to deny the dependency. |
|
Adds data dependencies for the physical‐register operand at |
|
Adds all physical‐register dependencies for the operand at |
|
Adds virtual‐register definition dependencies for the operand at |
|
Adds virtual‐register use dependencies for the operand at |
|
Return false if the misched‐cutoff limit has been reached. |
|
Returns true if the def register in |
|
Dump |
|
dump the scheduled Sequence. |
|
Print an execution trace of the schedule bottom‐up. |
|
Print execution trace of the schedule top‐down or bottom‐up. |
|
Find top/bottom roots and bias weak edges before queue setup. |
|
Returns a (possibly null) pointer to the current BatchAAResults. |
|
Returns a mask for which lanes get read/written by the given (register) machine operand. |
|
Release ExitSU predecessors and setup scheduler queues. |
|
Creates an SUnit for each instruction in the current region. |
|
Reinsert debug_values recorded in ScheduleDAGInstrs::DbgValues. |
|
Apply each ScheduleDAGMutation step in order. This allows different instances of ScheduleDAGMI to perform custom DAG postprocessing. |
|
Release predecessor edge |
|
Release all predecessors of |
|
Release successor edge |
|
Release all successors of |
|
Update scheduler DAG and queues after scheduling an instruction. |
Protected Data Members
Name |
Description |
Alias analysis used while building memory dependencies. |
|
Optional batch alias‐analysis results used while adding memory deps. |
|
The block in which to insert instructions |
|
Generic side‐effecting instruction that acts as a scheduling barrier. |
|
True if this scheduler can safely include terminators as DAG nodes. |
|
Clusters of related SUnits discovered while building the DAG. |
|
The bottom of the unscheduled zone. |
|
The top of the unscheduled zone. |
|
Tracks the last instruction(s) in this region defining each virtual register. There may be multiple current definitions for a register with disjunct lanemasks. |
|
Tracks the last instructions in this region using each virtual register. |
|
Remember instruction that precedes DBG_VALUE. These are generated by buildSchedGraph but persist so they can be referenced when emitting the final schedule. |
|
Map from register units to SUnits that define them in the current walk. |
|
Direction used when dumping the schedule. |
|
First DBG_VALUE instruction preceding the scheduled region, if any. |
|
Live intervals used by DAG mutations and pressure tracking. |
|
Set of live physical registers for updating kill flags. |
|
Block frequencies used by scheduling heuristics. |
|
Frame information for the function. |
|
After calling BuildSchedGraph, each machine instruction in the current scheduling region is mapped to an SUnit. |
|
Loop information for the function. |
|
Number of memory operations processed while building the DAG. |
|
Ordered list of DAG postprocessing steps. |
|
Instructions in this region (distance(RegionBegin, RegionEnd)). |
|
The beginning of the range to be scheduled. |
|
The end of the range to be scheduled. |
|
True if the DAG builder should remove kill flags (in preparation for rescheduling). |
|
Strategy that selects the next node to schedule. |
|
TargetSchedModel provides an interface to the machine model. |
|
True if regions with a single MI should be scheduled. |
|
Topo ‐ A topological ordering for SUnits which permits fast IsReachable and similar queries. |
|
Whether lane masks should get tracked. |
|
For an unanalyzable memory access, this Value is used in maps. |
|
Map from register units to SUnits that use them in the current walk. |
Non-Member Functions
Name |
Description |
Create a generic scheduler with no vreg liveness or DAG mutation passes. |
|
Fuse two scheduling units so they are scheduled back to back. |
Derived Classes
Name |
Description |
ScheduleDAG that tracks live intervals and register pressure. |
Created with MrDocs