Represents one node in the SelectionDAG.
Synopsis
Declared in <llvm/CodeGen/SelectionDAGNodes.h>
class SDNode
: public FoldingSetNode
, public ilist_node<SDNode>
Base Classes
Name |
Description |
Convenience alias for the base node type stored in a folding set. |
|
An intrusive list node. |
Types
Name |
Description |
This class provides iterator support for SDUse operands that use a specific SDNode. |
|
Iterator for directly iterating over the operand SDValue's. |
Type Aliases
Member Functions
Name |
Description |
Gather unique data for the node. |
|
This method should only be used by the SDUse class. |
|
Dump this node, for debugging. |
|
Dump this node, for debugging. The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. |
|
Dump (recursively) this node and its use‐def subgraph. |
|
Dump (recursively) this node and its use‐def subgraph. The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. |
|
printrFull to dbgs(). The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. Unlike dumpr, this will print the whole DAG, including children that appear multiple times. |
|
printrWithDepth to dbgs(). The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. Unlike dumpr, this will print children that appear multiple times wherever they are used. |
|
Helper method returns the APInt value of a ConstantSDNode. |
|
Helper method returns the zero‐extended integer value of a ConstantSDNode. |
|
Get worklist index for DAGCombiner |
|
Helper method returns the APInt of a ConstantSDNode operand. |
|
Helper method returns the integer value of a ConstantSDNode operand. |
|
Return the source location info. |
|
If this node has a glue operand, return the node to which the glue operand points. Otherwise return NULL. |
|
If this node has a glue value with a user, return the user (there is at most one). Otherwise return NULL. |
|
Return the node ordering. |
|
This may only be called if isMachineOpcode returns true. It returns the MachineInstr opcode value that the node's opcode corresponds to. |
|
Return the unique node id. |
|
Return the number of values used by this operation. |
|
Return the number of values defined/returned by this operator. |
|
Return the SelectionDAG opcode value for this node. For pre‐isel nodes (those for which isMachineOpcode returns false), these are the opcode values in the ISD and <target>ISD namespaces. For post‐isel opcodes, see getMachineOpcode. |
|
Return the opcode of this operation for printing. |
|
Get visited state for ScheduleDAGSDNodes::BuildSchedUnits. |
|
Return the type of a specified result as a simple type. |
|
Returns MVT::getSizeInBits(getValueType(ResNo)). |
|
Return the type of a specified result. |
|
Return true if there are any use of the indicated value. This method ignores uses of other values defined by this operation. |
|
Return true if there are exactly NUSES uses of the indicated value. This method ignores uses of other values defined by this operation. |
|
Return true if there is exactly one use of this node. |
|
Return true if N is a predecessor of this node. N is either an operand of this node, or can be reached by recursively traversing up the operands. NOTE: This is an expensive method. Use it carefully. |
|
Clear any flags in this node that aren't also set in Flags. If Flags is not in a defined state then this has no effect. |
|
Returns true if the node type is ADD or PTRADD. |
|
Test if this node is an assert operation. |
|
Test if this node has a post‐isel opcode, directly corresponding to a MachineInstr opcode. |
|
Test if this node is a memory intrinsic (with valid pointer information). |
|
Return true if this node is the only use of N. |
|
Return true if this node is an operand of N. |
|
Return true if this node is a predecessor of N. NOTE: Implemented on top of hasPredecessor and every bit as expensive. Use carefully. |
|
Test if this node is a strict floating point pseudo‐op. |
|
Test if this node has a target‐specific opcode (in the <target>ISD namespace). |
|
Returns true if the node type is UNDEF or POISON. |
|
Test if this node is a vector predication operation. |
|
Print a SelectionDAG node and all children down to the leaves. The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. Unlike printr, this will print the whole DAG, including children that appear multiple times. |
|
Print a SelectionDAG node and children up to depth "depth." The given SelectionDAG allows target‐specific nodes to be printed in human‐readable form. Unlike printr, this will print children that appear multiple times wherever they are used. |
|
Set worklist index for DAGCombiner |
|
Set source location info. Try to avoid this, putting it in the constructor is preferable. |
|
Set the node ordering. |
|
Set unique node id. |
|
Set visited state for ScheduleDAGSDNodes::BuildSchedUnits. |
|
Provide iteration support to walk over all uses of an SDNode. |
|
Return true if there are no uses of this node. |
|
Return the number of uses of this node. This method takes time proportional to the number of uses. |
|
Provide iteration support to walk over all users of an SDNode. |
|
Static Member Functions
Name |
Description |
Return true if all the users of N are contained in Nodes. NOTE: Requires at least one match, but doesn't require them all. |
|
Return the maximum number of operands that a SDNode can hold. |
|
Returns true if N is a predecessor of any node in Worklist. This helper keeps Visited and Worklist sets externally to allow unions searches to be performed in parallel, caching of results across queries and incremental addition to Worklist. Stops early if N is found but will resume. Remember to clear Visited and Worklists if DAG changes. MaxSteps gives a maximum number of nodes to visit before giving up. The TopologicalPrune flag signals that positive NodeIds are topologically ordered (Operands have strictly smaller node id) and search can be pruned leveraging this. |
|
Data Members
Name |
Description |
|
Index in worklist of DAGCombiner, or negative if the node is not in the worklist. ‐1 = not in worklist; ‐2 = not in worklist, but has already been combined at least once. |
|
|
|
|
|
|
|
|
Unique and persistent id per SDNode in the DAG. Used for debug printing. We do not place that under |
|
|
|
|
|
|
Visited state in ScheduleDAGSDNodes::BuildSchedUnits. |
|
Protected Types
Protected Enums
Protected Member Functions
Name |
Description |
|
Create an SDNode. |
Release the operands and set this node to have zero operands. |
Protected Static Member Functions
Name |
Friends
Name |
Description |
This class is used to form a handle around another node that is persistent and is updated across invocations of replaceAllUsesWith on its operand. This node should be directly created by end‐users and not added to the AllNodes list. |
|
This is used to represent a portion of an LLVM function in a low‐level Data Dependence DAG representation suitable for instruction selection. This DAG is constructed as the first step of instruction selection in order to allow implementation of machine specific optimizations and code simplifications. |
Non-Member Functions
Name |
Description |
Return true if the node has at least one operand and all operands of the specified node are ISD::UNDEF. |
|
Return true if the specified node is a BUILD_VECTOR where all of the elements are ~0 or undef. |
|
Return true if the specified node is a BUILD_VECTOR where all of the elements are 0 or undef. |
|
Return true if the specified node is a BUILD_VECTOR node of all ConstantFPSDNode or undef. |
|
Return true if the specified node is a BUILD_VECTOR node of all ConstantSDNode or undef. |
|
If N is a BUILD_VECTOR or SPLAT_VECTOR node whose elements are all the same constant or undefined, return true and return the constant value in |
|
Return true if the specified node is a BUILD_VECTOR or SPLAT_VECTOR where all of the elements are ~0 or undef. If |
|
Return true if the specified node is a BUILD_VECTOR or SPLAT_VECTOR where all of the elements are 0 or undef. If |
|
Returns true if the specified node is a EXTLOAD. |
|
Return true if the specified node is FREEZE(UNDEF). |
|
Returns true if the specified node is a non‐extending load. |
|
Returns true if the specified node is a non‐extending and unindexed load. |
|
Returns true if the specified node is a non‐extending and unindexed masked load. |
|
Returns true if the specified node is a non‐extending and unindexed masked store. |
|
Returns true if the specified node is a non‐truncating and unindexed store. |
|
Returns true if the specified node is a SEXTLOAD. |
|
Returns true if the specified node is an unindexed load. |
|
Returns true if the specified node is an unindexed store. |
|
Returns true if the specified node is a vector where all elements can be truncated to the specified element size without a loss in meaning. |
|
Returns true if the specified node is a ZEXTLOAD. |
Derived Classes
Name |
Description |
An SDNode that records if a register contains a value that is guaranteed to be aligned accordingly. |
|
A "pseudo‐class" with methods for operating on BUILD_VECTORs. |
|
This class is used to form a handle around another node that is persistent and is updated across invocations of replaceAllUsesWith on its operand. This node should be directly created by end‐users and not added to the AllNodes list. |
|
This SDNode is used for LIFETIME_START/LIFETIME_END values. |
|
An SDNode that represents everything that will be needed to construct a MachineInstr. These nodes are created during the instruction selection proper phase. |
|
This is an abstract virtual class for memory operations. |
|
This SDNode is used for PSEUDO_PROBE values, which are the function guid and the index of the basic block being probed. A pseudo probe serves as a place holder and will be removed at the end of compilation. It does not have any operand because we do not want the instruction selection to deal with any. |
|
This SDNode is used to implement the code generator support for the llvm IR shufflevector instruction. It combines elements from two input vectors into a new input vector, with the selection and ordering of elements determined by an array of integers, referred to as the shuffle mask. For input vectors of width N, mask indices of 0..N‐1 refer to elements from the LHS input, and indices from N to 2N‐1 the RHS. An index of ‐1 is treated as undef, such that the code generator may put any value in the corresponding element of the result. |
|
An SDNode that holds an arbitrary LLVM IR Value. This is used when the SelectionDAG needs to make a simple reference to something in the LLVM IR representation. |
|
Completely target‐dependent object reference. |
|
This class is used to represent EVT's, which are used to parameterize some operations. |
Created with MrDocs