|
LLVM
3.7.0
|
A "pseudo-class" with methods for operating on BUILD_VECTORs. More...
#include <SelectionDAGNodes.h>
Public Member Functions | |
| bool | isConstantSplat (APInt &SplatValue, APInt &SplatUndef, unsigned &SplatBitSize, bool &HasAnyUndefs, unsigned MinSplatBits=0, bool isBigEndian=false) const |
| Check if this is a constant splat, and if so, find the smallest element size that splats the vector. More... | |
| SDValue | getSplatValue (BitVector *UndefElements=nullptr) const |
| Returns the splatted value or a null value if this is not a splat. More... | |
| ConstantSDNode * | getConstantSplatNode (BitVector *UndefElements=nullptr) const |
| Returns the splatted constant or null if this is not a constant splat. More... | |
| ConstantFPSDNode * | getConstantFPSplatNode (BitVector *UndefElements=nullptr) const |
| Returns the splatted constant FP or null if this is not a constant FP splat. More... | |
| bool | isConstant () const |
Public Member Functions inherited from llvm::SDNode | |
| unsigned | getOpcode () const |
| Return the SelectionDAG opcode value for this node. More... | |
| bool | isTargetOpcode () const |
| Test if this node has a target-specific opcode (in the <target>ISD namespace). More... | |
| bool | isTargetMemoryOpcode () const |
| Test if this node has a target-specific memory-referencing opcode (in the <target>ISD namespace and greater than FIRST_TARGET_MEMORY_OPCODE). More... | |
| bool | isMemIntrinsic () const |
| Test if this node is a memory intrinsic (with valid pointer information). More... | |
| bool | isMachineOpcode () const |
| Test if this node has a post-isel opcode, directly corresponding to a MachineInstr opcode. More... | |
| unsigned | getMachineOpcode () const |
| This may only be called if isMachineOpcode returns true. More... | |
| bool | getHasDebugValue () const |
| Get this bit. More... | |
| void | setHasDebugValue (bool b) |
| Set this bit. More... | |
| bool | use_empty () const |
| Return true if there are no uses of this node. More... | |
| bool | hasOneUse () const |
| Return true if there is exactly one use of this node. More... | |
| size_t | use_size () const |
| Return the number of uses of this node. More... | |
| int | getNodeId () const |
| Return the unique node id. More... | |
| void | setNodeId (int Id) |
| Set unique node id. More... | |
| unsigned | getIROrder () const |
| Return the node ordering. More... | |
| void | setIROrder (unsigned Order) |
| Set the node ordering. More... | |
| const DebugLoc & | getDebugLoc () const |
| Return the source location info. More... | |
| void | setDebugLoc (DebugLoc dl) |
| Set source location info. More... | |
| use_iterator | use_begin () const |
| Provide iteration support to walk over all uses of an SDNode. More... | |
| iterator_range< use_iterator > | uses () |
| iterator_range< use_iterator > | uses () const |
| bool | hasNUsesOfValue (unsigned NUses, unsigned Value) const |
| Return true if there are exactly NUSES uses of the indicated value. More... | |
| bool | hasAnyUseOfValue (unsigned Value) const |
| Return true if there are any use of the indicated value. More... | |
| bool | isOnlyUserOf (const SDNode *N) const |
| Return true if this node is the only use of N. More... | |
| bool | isOperandOf (const SDNode *N) const |
| Return true if this node is an operand of N. More... | |
| bool | isPredecessorOf (const SDNode *N) const |
| Return true if this node is a predecessor of N. More... | |
| bool | hasPredecessor (const SDNode *N) const |
| Return true if N is a predecessor of this node. More... | |
| bool | hasPredecessorHelper (const SDNode *N, SmallPtrSetImpl< const SDNode * > &Visited, SmallVectorImpl< const SDNode * > &Worklist) const |
| Return true if N is a predecessor of this node. More... | |
| unsigned | getNumOperands () const |
| Return the number of values used by this operation. More... | |
| uint64_t | getConstantOperandVal (unsigned Num) const |
| Helper method returns the integer value of a ConstantSDNode operand. More... | |
| const SDValue & | getOperand (unsigned Num) const |
| op_iterator | op_begin () const |
| op_iterator | op_end () const |
| ArrayRef< SDUse > | ops () const |
| iterator_range< value_op_iterator > | op_values () const |
| SDVTList | getVTList () const |
| SDNode * | getGluedNode () const |
| If this node has a glue operand, return the node to which the glue operand points. More... | |
| const SDNode * | getGluedMachineNode () const |
| SDNode * | getGluedUser () const |
| If this node has a glue value with a user, return the user (there is at most one). More... | |
| unsigned | getNumValues () const |
| Return the number of values defined/returned by this operator. More... | |
| EVT | getValueType (unsigned ResNo) const |
| Return the type of a specified result. More... | |
| MVT | getSimpleValueType (unsigned ResNo) const |
| Return the type of a specified result as a simple type. More... | |
| unsigned | getValueSizeInBits (unsigned ResNo) const |
| Returns MVT::getSizeInBits(getValueType(ResNo)). More... | |
| value_iterator | value_begin () const |
| value_iterator | value_end () const |
| std::string | getOperationName (const SelectionDAG *G=nullptr) const |
| Return the opcode of this operation for printing. More... | |
| void | print_types (raw_ostream &OS, const SelectionDAG *G) const |
| void | print_details (raw_ostream &OS, const SelectionDAG *G) const |
| void | print (raw_ostream &OS, const SelectionDAG *G=nullptr) const |
| void | printr (raw_ostream &OS, const SelectionDAG *G=nullptr) const |
| void | printrFull (raw_ostream &O, const SelectionDAG *G=nullptr) const |
| Print a SelectionDAG node and all children down to the leaves. More... | |
| void | printrWithDepth (raw_ostream &O, const SelectionDAG *G=nullptr, unsigned depth=100) const |
| Print a SelectionDAG node and children up to depth "depth." The given SelectionDAG allows target-specific nodes to be printed in human-readable form. More... | |
| void | dump () const |
| Dump this node, for debugging. More... | |
| void | dumpr () const |
| Dump (recursively) this node and its use-def subgraph. More... | |
| void | dump (const SelectionDAG *G) const |
| Dump this node, for debugging. More... | |
| void | dumpr (const SelectionDAG *G) const |
| Dump (recursively) this node and its use-def subgraph. More... | |
| void | dumprFull (const SelectionDAG *G=nullptr) const |
| printrFull to dbgs(). More... | |
| void | dumprWithDepth (const SelectionDAG *G=nullptr, unsigned depth=100) const |
| printrWithDepth to dbgs(). More... | |
| void | Profile (FoldingSetNodeID &ID) const |
| Gather unique data for the node. More... | |
| void | addUse (SDUse &U) |
| This method should only be used by the SDUse class. More... | |
Public Member Functions inherited from llvm::FoldingSetImpl::Node | |
| Node () | |
| void * | getNextInBucket () const |
| void | SetNextInBucket (void *N) |
Public Member Functions inherited from llvm::ilist_node< SDNode > | |
| SDNode * | getPrevNode () |
| Get the previous node, or 0 for the list head. More... | |
| const SDNode * | getPrevNode () const |
| Get the previous node, or 0 for the list head. More... | |
| SDNode * | getNextNode () |
| Get the next node, or 0 for the list tail. More... | |
| const SDNode * | getNextNode () const |
| Get the next node, or 0 for the list tail. More... | |
Static Public Member Functions | |
| static bool | classof (const SDNode *N) |
Static Public Member Functions inherited from llvm::SDNode | |
| static use_iterator | use_end () |
| static const char * | getIndexedModeName (ISD::MemIndexedMode AM) |
Additional Inherited Members | |
Public Types inherited from llvm::SDNode | |
| typedef SDUse * | op_iterator |
| typedef const EVT * | value_iterator |
Protected Member Functions inherited from llvm::SDNode | |
| SDNode (unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs, ArrayRef< SDValue > Ops) | |
| SDNode (unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs) | |
| This constructor adds no operands itself; operands can be set later with InitOperands. More... | |
| void | InitOperands (SDUse *Ops, const SDValue &Op0) |
| Initialize the operands list of this with 1 operand. More... | |
| void | InitOperands (SDUse *Ops, const SDValue &Op0, const SDValue &Op1) |
| Initialize the operands list of this with 2 operands. More... | |
| void | InitOperands (SDUse *Ops, const SDValue &Op0, const SDValue &Op1, const SDValue &Op2) |
| Initialize the operands list of this with 3 operands. More... | |
| void | InitOperands (SDUse *Ops, const SDValue &Op0, const SDValue &Op1, const SDValue &Op2, const SDValue &Op3) |
| Initialize the operands list of this with 4 operands. More... | |
| void | InitOperands (SDUse *Ops, const SDValue *Vals, unsigned N) |
| Initialize the operands list of this with N operands. More... | |
| void | DropOperands () |
| Release the operands and set this node to have zero operands. More... | |
Protected Member Functions inherited from llvm::ilist_node< SDNode > | |
| ilist_node () | |
Static Protected Member Functions inherited from llvm::SDNode | |
| static SDVTList | getSDVTList (EVT VT) |
Protected Attributes inherited from llvm::SDNode | |
| uint16_t | SubclassData: 14 |
| This member is defined by this class, but is not used for anything. More... | |
A "pseudo-class" with methods for operating on BUILD_VECTORs.
Definition at line 1660 of file SelectionDAGNodes.h.
Definition at line 1702 of file SelectionDAGNodes.h.
References llvm::ISD::BUILD_VECTOR, and llvm::SDNode::getOpcode().
| ConstantFPSDNode * BuildVectorSDNode::getConstantFPSplatNode | ( | BitVector * | UndefElements = nullptr | ) | const |
Returns the splatted constant FP or null if this is not a constant FP splat.
If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.
Definition at line 7100 of file SelectionDAG.cpp.
References getSplatValue().
| ConstantSDNode * BuildVectorSDNode::getConstantSplatNode | ( | BitVector * | UndefElements = nullptr | ) | const |
Returns the splatted constant or null if this is not a constant splat.
If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.
Definition at line 7095 of file SelectionDAG.cpp.
References getSplatValue().
Referenced by llvm::TargetLowering::isConstFalseVal(), and llvm::TargetLowering::isConstTrueVal().
Returns the splatted value or a null value if this is not a splat.
If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.
Definition at line 7067 of file SelectionDAG.cpp.
References llvm::BitVector::clear(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::BitVector::resize(), and llvm::ISD::UNDEF.
Referenced by getConstantFPSplatNode(), getConstantSplatNode(), and llvm::SelectionDAG::getVectorShuffle().
| bool BuildVectorSDNode::isConstant | ( | ) | const |
Definition at line 7104 of file SelectionDAG.cpp.
References llvm::ISD::Constant, llvm::ISD::ConstantFP, llvm::SDValue::getOpcode(), llvm::SDNode::op_values(), and llvm::ISD::UNDEF.
| bool BuildVectorSDNode::isConstantSplat | ( | APInt & | SplatValue, |
| APInt & | SplatUndef, | ||
| unsigned & | SplatBitSize, | ||
| bool & | HasAnyUndefs, | ||
| unsigned | MinSplatBits = 0, |
||
| bool | isBigEndian = false |
||
| ) | const |
Check if this is a constant splat, and if so, find the smallest element size that splats the vector.
If MinSplatBits is nonzero, the element size must be at least that large. Note that the splat element may be the entire vector (i.e., a one element vector). Returns the splat element value in SplatValue. Any undefined bits in that value are zero, and the corresponding bits in the SplatUndef mask are set. The SplatBitSize value is set to the splat element size in bits. HasAnyUndefs is set to true if any bits in the vector are undefined. isBigEndian describes the endianness of the target.
Definition at line 7001 of file SelectionDAG.cpp.
References llvm::APInt::getBitsSet(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::isVector(), llvm::APInt::lshr(), llvm::APInt::trunc(), llvm::ISD::UNDEF, and llvm::APInt::zextOrTrunc().
Referenced by getVShiftImm(), isConstantSplatVector(), isVectorAllOnes(), isVSplat(), llvm::HexagonTargetLowering::LowerBUILD_VECTOR(), PerformANDCombine(), performDSPShiftCombine(), PerformORCombine(), resolveBuildVector(), tryCombineShiftImm(), and VectorZextCombine().
1.8.6