This class builds the dependence graph for the instructions in a loop, and attempts to schedule the instructions using the SMS algorithm.
Declared in <llvm/CodeGen/MachinePipeliner.h>
class SwingSchedulerDAG
: public ScheduleDAGInstrs
| Name | Description |
|---|---|
ScheduleDAGInstrs | A ScheduleDAG for scheduling lists of MachineInstr. |
| Name | Description |
|---|---|
SUList | List of SUnits associated with a memory value during DAG construction. |
| Name | Description |
|---|---|
DumpDirection | The direction that should be used to dump the scheduled Sequence. |
| Name | Description |
|---|---|
SwingSchedulerDAG [constructor] | Construct a swing scheduler DAG for loop L in pass P. |
operator= [deleted] | Copy assignment is deleted; ScheduleDAG is passed by reference only. |
IsReachable | IsReachable - Checks if SU is reachable from TargetSU. |
VerifyScheduledDAG | Verifies that all SUnits were scheduled and that their state is consistent. Returns the number of scheduled SUnits. |
addCustomGraphFeatures [virtual] | Adds custom features for a visualization of the ScheduleDAG. |
addEdge | Add a DAG edge to the given SU with the given predecessor dependence data. |
addMutation | Append a post-processing DAG mutation. |
addSchedBarrierDeps | Adds dependencies from region instructions to the scheduling barrier. |
applyInstrChange | Apply a deferred instruction change for MI using Schedule. |
begin | Returns an iterator to the top of the current scheduling region. |
buildSchedGraph | Builds SUnits for the current scheduling region. |
canAddEdge | True if an edge can be added from PredSU to SuccSU without creating a cycle. |
clearDAG | Clears the DAG state (between regions). |
doMBBSchedRegionsTopDown [virtual] | Returns true if MBB scheduling regions should be handled top-down. |
dump [virtual] | Dumps the scheduling DAG for debugging. |
dumpNode [virtual] | Dumps a single scheduling unit for debugging. |
dumpNodeName | Dump the printable name of SU. |
end | Returns an iterator to the bottom of the current scheduling region. |
enterRegion [virtual] | Initializes DAG and scheduler state for a new scheduling region. |
exitRegion [virtual] | Called when the scheduler has finished scheduling the current region. |
finalizeSchedule [virtual] | Allow targets to perform final scheduling actions at the level of the whole MachineFunction. By default does nothing. |
finishBlock [virtual] | Finish the current basic block after scheduling. |
fixupKills | Fixes register kill flags that scheduling has made invalid. |
fixupRegisterOverlaps | Fix register overlaps among the scheduled instructions in Instrs. |
getALAP | Return the latest time an instruction my be scheduled. |
getASAP | Return the earliest time an instruction may be scheduled. |
getCluster | Get the specific cluster, return nullptr for InvalidClusterId. |
getClusters | Returns the array of the clusters. |
getDAGName [virtual] | Returns a label for the region of code covered by the DAG. |
getDDG | Return the swing scheduler dependence graph. |
getDepth | The depth, in the dependence graph, for a node. |
getGraphNodeLabel [virtual] | Returns a label for a DAG node that points to an instruction. |
getHeight | The height, in the dependence graph, for a node. |
getInstrBaseReg | Return the new base register that was stored away for the changed instruction. |
getInstrDesc | Returns the MCInstrDesc of this SUnit. Returns NULL for SDNodes without a machine opcode. |
getMOV | The mobility function, which the number of slots in which an instruction may be scheduled. |
getSUnit | Returns an existing SUnit for this MI, or nullptr. |
getSchedClass | Resolves and cache a resolved scheduling class for an SUnit. |
getSchedModel | Gets the machine model for instruction scheduling. |
getZeroLatencyDepth | The maximum unweighted length of a path from an arbitrary node to the given node in which each edge has latency 0 |
getZeroLatencyHeight | The maximum unweighted length of a path from the given node to an arbitrary node in which each edge has latency 0 |
hasNewSchedule | Return true if the loop kernel has been scheduled. |
mayOverlapInLaterIter | Return true if BaseMI and OtherMI may overlap in a later iteration. |
newSUnit | Creates a new SUnit and return a ptr to it. |
schedule [virtual] | Build the dependence graph and attempt to schedule the loop with SMS. |
setDumpDirection | Sets the direction used when dumping the scheduled sequence. |
shouldScheduleSingleMIRegions | Whether regions with a single MI should be scheduled. |
startBlock [virtual] | Prepares to perform scheduling in the given block. |
viewGraph | viewGraph overloads |
| Name | Description |
|---|---|
classof | Return true if DAG is a SwingSchedulerDAG. |
| Name | Description |
|---|---|
EntrySU | Special node for the region entry. |
ExitSU | Special node for the region exit. |
MF | Machine function |
MRI | Virtual/real register map |
SUnits | The scheduling units. |
StressSched | When true, stress-test the scheduler. |
TII | Target instruction information |
TM | Target processor |
TRI | Target processor register info |
| Name | Description |
|---|---|
Value2SUsMap | A map from ValueType to SUList, used during DAG construction, as a means of remembering which SUs depend on which memory locations. |
| Name | Description |
|---|---|
DbgValueVector | Pairs of DBG_VALUE instructions and the instructions they follow. |
| Name | Description |
|---|---|
addBarrierChain | Adds barrier-chain edges from all SUs in map, then clears the map. |
addChainDependencies | addChainDependencies overloads |
addChainDependency | Adds a chain edge between SUa and SUb, but only if both AAResults and Target fail to deny the dependency. |
addPhysRegDataDeps | Adds data dependencies for the physical-register operand at OperIdx. |
addPhysRegDeps | Adds all physical-register dependencies for the operand at OperIdx. |
addVRegDefDeps | Adds virtual-register definition dependencies for the operand at OperIdx. |
addVRegUseDeps | Adds virtual-register use dependencies for the operand at OperIdx. |
deadDefHasNoUse | Returns true if the def register in MO has no uses. |
dumpNodeAll | Dump SU and all of its scheduling attributes. |
getAAForDep | Returns a (possibly null) pointer to the current BatchAAResults. |
getLaneMaskForMO | Returns a mask for which lanes get read/written by the given (register) machine operand. |
initSUnits | Creates an SUnit for each instruction in the current region. |
| Name | Description |
|---|---|
AAForDep | Optional batch alias-analysis results used while adding memory deps. |
BB | The block in which to insert instructions |
BarrierChain | Generic side-effecting instruction that acts as a scheduling barrier. |
CanHandleTerminators | True if this scheduler can safely include terminators as DAG nodes. |
Clusters | Clusters of related SUnits discovered while building the DAG. |
CurrentVRegDefs | Tracks the last instruction(s) in this region defining each virtual register. There may be multiple current definitions for a register with disjunct lanemasks. |
CurrentVRegUses | Tracks the last instructions in this region using each virtual register. |
DbgValues | Remember instruction that precedes DBG_VALUE. These are generated by buildSchedGraph but persist so they can be referenced when emitting the final schedule. |
Defs | Map from register units to SUnits that define them in the current walk. |
DumpDir | Direction used when dumping the schedule. |
FirstDbgValue | First DBG_VALUE instruction preceding the scheduled region, if any. |
LiveRegs | Set of live physical registers for updating kill flags. |
MFI | Frame information for the function. |
MISUnitMap | After calling BuildSchedGraph, each machine instruction in the current scheduling region is mapped to an SUnit. |
MLI | Loop information for the function. |
MemOpsProcessed | Number of memory operations processed while building the DAG. |
NumRegionInstrs | Instructions in this region (distance(RegionBegin, RegionEnd)). |
RegionBegin | The beginning of the range to be scheduled. |
RegionEnd | The end of the range to be scheduled. |
RemoveKillFlags | True if the DAG builder should remove kill flags (in preparation for rescheduling). |
SchedModel | TargetSchedModel provides an interface to the machine model. |
ScheduleSingleMIRegions | True if regions with a single MI should be scheduled. |
Topo | Topo - A topological ordering for SUnits which permits fast IsReachable and similar queries. |
TrackLaneMasks | Whether lane masks should get tracked. |
UnknownValue | For an unanalyzable memory access, this Value is used in maps. |
Uses | Map from register units to SUnits that use them in the current walk. |
| Name | Description |
|---|---|
fuseInstructionPair | Fuse two scheduling units so they are scheduled back to back. |