Scheduling unit. This is a node in the scheduling DAG.
Declared in <llvm/CodeGen/ScheduleDAG.h>
class SUnit;
| Name | Description |
|---|---|
const_pred_iterator | Const iterator over predecessor dependence edges. |
const_succ_iterator | Const iterator over successor dependence edges. |
pred_iterator | Mutable iterator over predecessor dependence edges. |
succ_iterator | Mutable iterator over successor dependence edges. |
| Name | Description |
|---|---|
SUnit [constructor] | Constructors |
addPred | Adds the specified edge as a pred of the current node if not already. It also adds the current node as a successor of the specified node. |
addPredBarrier | Adds a barrier edge to SU by calling addPred(), with latency 0 generally or latency 1 for a store followed by a load. |
biasCriticalPath | Orders this node's predecessor edges such that the critical path edge occurs first. |
dumpAttributes | Dump scheduling attributes of this SUnit for debugging. |
getDepth | Returns the depth of this node, which is the length of the maximum path up to any node which has no predecessors. |
getHeight | Returns the height of this node, which is the length of the maximum path down to any node which has no successors. |
getInstr | Returns the representative MachineInstr for this SUnit. This may be used during post-regalloc scheduling. |
getNode | Returns the representative SDNode for this SUnit. This may be used during pre-regalloc scheduling. |
isBottomReady | Returns true if all successors have been scheduled. |
isBoundaryNode | Boundary nodes are placeholders for the boundary of the scheduling region. |
isClustered | Returns true if this SUnit belongs to a cluster group. |
isInstr | Returns true if this SUnit refers to a machine instruction as opposed to an SDNode. |
isPred | Tests if node N is a predecessor of this node. |
isSucc | Tests if node N is a successor of this node. |
isTopReady | Returns true if all predecessors have been scheduled. |
removePred | Removes the specified edge as a pred of the current node if it exists. It also removes the current node as a successor of the specified node. |
setDepthDirty | Sets a flag in this node to indicate that its stored Depth value will require recomputation the next time getDepth() is called. |
setDepthToAtLeast | If NewDepth is greater than this node's depth value, sets it to be the new depth value. This also recursively marks successor nodes dirty. |
setHeightDirty | Sets a flag in this node to indicate that its stored Height value will require recomputation the next time getHeight() is called. |
setHeightToAtLeast | If NewHeight is greater than this node's height value, set it to be the new height value. This also recursively marks predecessor nodes dirty. |
setInstr | Assigns the instruction for the SUnit. This may be used during post-regalloc scheduling. |
setNode | Assigns the representative SDNode for this SUnit. This may be used during pre-regalloc scheduling. |
| Name | Description |
|---|---|
BotReadyCycle | Cycle relative to end when node is ready. |
CopyDstRC | Destination register class for a special copy node, or nullptr. |
CopySrcRC | Source register class for a special copy node, or nullptr. |
Instr [variant member] | Alternatively, a MachineInstr. |
Latency | Node latency. |
Node [variant member] | Representative node. |
NodeNum | Entry # of node in the node vector. |
NodeQueueId | Queue id of node. |
NumPreds | # of SDep::Data preds. |
NumPredsLeft | # of preds not scheduled. |
NumRegDefsLeft | # of reg defs with no scheduled use. |
NumSuccs | # of SDep::Data sucss. |
NumSuccsLeft | # of succs not scheduled. |
OrigNode | If not this, the node from which this node |
ParentClusterIdx | The parent cluster id. |
Preds | All sunit predecessors. |
SchedClass | was cloned. (SD scheduling only) |
SchedulingPref | Scheduling preference. |
Succs | All sunit successors. |
TopReadyCycle | Cycle relative to start when node is ready. |
WeakPredsLeft | # of weak preds not scheduled. |
WeakSuccsLeft | # of weak succs not scheduled. |
hasPhysRegClobbers | Has any physreg defs, used or not. |
hasPhysRegDefs | Has physreg defs that are being used. |
hasPhysRegUses | Has physreg uses. |
hasReservedResource | Uses a reserved resource. |
isAvailable | True once available. |
isCall | Is a function call. |
isCallOp | Is a function call operand. |
isCloned | True if this node has been cloned. |
isCommutable | Is a commutable instruction. |
isPending | True once pending. |
isScheduleHigh | True if preferable to schedule high. |
isScheduleLow | True if preferable to schedule low. |
isScheduled | True once scheduled. |
isTwoAddress | Is a two-address instruction. |
isUnbuffered | Uses an unbuffered resource. |
isVRegCycle | May use and def the same vreg. |
| Name | Description |
|---|---|
biasPhysReg | Return a bias score for scheduling physreg-related unit SU. |
getWeakLeft | Return the number of unresolved weak edges for SU. |
hasLessThanNumFused | Checks if the number of cluster edges between SU and its predecessors is less than FuseLimit. |