LLVM 17.0.0git
|
This SDNode is used to implement the code generator support for the llvm IR shufflevector instruction. More...
#include "llvm/CodeGen/SelectionDAGNodes.h"
Public Member Functions | |
ArrayRef< int > | getMask () const |
int | getMaskElt (unsigned Idx) const |
bool | isSplat () const |
int | getSplatIndex () const |
![]() | |
unsigned | getOpcode () const |
Return the SelectionDAG opcode value for this node. | |
bool | isTargetOpcode () const |
Test if this node has a target-specific opcode (in the <target>ISD namespace). | |
bool | isTargetStrictFPOpcode () const |
Test if this node has a target-specific opcode that may raise FP exceptions (in the <target>ISD namespace and greater than FIRST_TARGET_STRICTFP_OPCODE). | |
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). | |
bool | isUndef () const |
Return true if the type of the node type undefined. | |
bool | isMemIntrinsic () const |
Test if this node is a memory intrinsic (with valid pointer information). | |
bool | isStrictFPOpcode () |
Test if this node is a strict floating point pseudo-op. | |
bool | isVPOpcode () const |
Test if this node is a vector predication operation. | |
bool | isMachineOpcode () const |
Test if this node has a post-isel opcode, directly corresponding to a MachineInstr opcode. | |
unsigned | getMachineOpcode () const |
This may only be called if isMachineOpcode returns true. | |
bool | getHasDebugValue () const |
void | setHasDebugValue (bool b) |
bool | isDivergent () const |
bool | use_empty () const |
Return true if there are no uses of this node. | |
bool | hasOneUse () const |
Return true if there is exactly one use of this node. | |
size_t | use_size () const |
Return the number of uses of this node. | |
int | getNodeId () const |
Return the unique node id. | |
void | setNodeId (int Id) |
Set unique node id. | |
unsigned | getIROrder () const |
Return the node ordering. | |
void | setIROrder (unsigned Order) |
Set the node ordering. | |
const DebugLoc & | getDebugLoc () const |
Return the source location info. | |
void | setDebugLoc (DebugLoc dl) |
Set source location info. | |
use_iterator | use_begin () const |
Provide iteration support to walk over all uses of an SDNode. | |
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. | |
bool | hasAnyUseOfValue (unsigned Value) const |
Return true if there are any use of the indicated value. | |
bool | isOnlyUserOf (const SDNode *N) const |
Return true if this node is the only use of N. | |
bool | isOperandOf (const SDNode *N) const |
Return true if this node is an operand of N. | |
bool | isPredecessorOf (const SDNode *N) const |
Return true if this node is a predecessor of N. | |
bool | hasPredecessor (const SDNode *N) const |
Return true if N is a predecessor of this node. | |
unsigned | getNumOperands () const |
Return the number of values used by this operation. | |
uint64_t | getConstantOperandVal (unsigned Num) const |
Helper method returns the integer value of a ConstantSDNode operand. | |
const APInt & | getConstantOperandAPInt (unsigned Num) const |
Helper method returns the APInt of a ConstantSDNode operand. | |
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. | |
SDNode * | getGluedUser () const |
If this node has a glue value with a user, return the user (there is at most one). | |
SDNodeFlags | getFlags () const |
void | setFlags (SDNodeFlags NewFlags) |
void | intersectFlagsWith (const SDNodeFlags Flags) |
Clear any flags in this node that aren't also set in Flags. | |
void | setCFIType (uint32_t Type) |
uint32_t | getCFIType () const |
unsigned | getNumValues () const |
Return the number of values defined/returned by this operator. | |
EVT | getValueType (unsigned ResNo) const |
Return the type of a specified result. | |
MVT | getSimpleValueType (unsigned ResNo) const |
Return the type of a specified result as a simple type. | |
TypeSize | getValueSizeInBits (unsigned ResNo) const |
Returns MVT::getSizeInBits(getValueType(ResNo)). | |
value_iterator | value_begin () const |
value_iterator | value_end () const |
iterator_range< value_iterator > | values () const |
std::string | getOperationName (const SelectionDAG *G=nullptr) const |
Return the opcode of this operation for printing. | |
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. | |
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. | |
void | dump () const |
Dump this node, for debugging. | |
void | dumpr () const |
Dump (recursively) this node and its use-def subgraph. | |
void | dump (const SelectionDAG *G) const |
Dump this node, for debugging. | |
void | dumpr (const SelectionDAG *G) const |
Dump (recursively) this node and its use-def subgraph. | |
void | dumprFull (const SelectionDAG *G=nullptr) const |
printrFull to dbgs(). | |
void | dumprWithDepth (const SelectionDAG *G=nullptr, unsigned depth=100) const |
printrWithDepth to dbgs(). | |
void | Profile (FoldingSetNodeID &ID) const |
Gather unique data for the node. | |
void | addUse (SDUse &U) |
This method should only be used by the SDUse class. | |
![]() | |
Node ()=default | |
void * | getNextInBucket () const |
void | SetNextInBucket (void *N) |
![]() | |
self_iterator | getIterator () |
const_self_iterator | getIterator () const |
reverse_self_iterator | getReverseIterator () |
const_reverse_self_iterator | getReverseIterator () const |
bool | isSentinel () const |
Check whether this is the sentinel node. | |
Static Public Member Functions | |
static bool | isSplatMask (const int *Mask, EVT VT) |
static void | commuteMask (MutableArrayRef< int > Mask) |
Change values in a shuffle permute mask assuming the two vector operands have swapped position. | |
static bool | classof (const SDNode *N) |
![]() | |
static use_iterator | use_end () |
static bool | hasPredecessorHelper (const SDNode *N, SmallPtrSetImpl< const SDNode * > &Visited, SmallVectorImpl< const SDNode * > &Worklist, unsigned int MaxSteps=0, bool TopologicalPrune=false) |
Returns true if N is a predecessor of any node in Worklist. | |
static bool | areOnlyUsersOf (ArrayRef< const SDNode * > Nodes, const SDNode *N) |
Return true if all the users of N are contained in Nodes. | |
static constexpr size_t | getMaxNumOperands () |
Return the maximum number of operands that a SDNode can hold. | |
static const char * | getIndexedModeName (ISD::MemIndexedMode AM) |
Protected Member Functions | |
ShuffleVectorSDNode (EVT VT, unsigned Order, const DebugLoc &dl, const int *M) | |
![]() | |
SDNode (unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs) | |
Create an SDNode. | |
void | DropOperands () |
Release the operands and set this node to have zero operands. | |
![]() | |
ilist_node_impl ()=default | |
Friends | |
class | SelectionDAG |
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.
Definition at line 1533 of file SelectionDAGNodes.h.
|
inlineprotected |
Definition at line 1541 of file SelectionDAGNodes.h.
Definition at line 1586 of file SelectionDAGNodes.h.
References N, and llvm::ISD::VECTOR_SHUFFLE.
|
inlinestatic |
Change values in a shuffle permute mask assuming the two vector operands have swapped position.
Definition at line 1573 of file SelectionDAGNodes.h.
Referenced by llvm::TargetLowering::buildLegalVectorShuffle(), canonicalizeShuffleMaskWithHorizOp(), combineHorizOpWithShuffle(), combineShuffleToZeroExtendVectorInReg(), combineX86ShuffleChainWithExtract(), combineX86ShufflesRecursively(), commuteShuffle(), llvm::SelectionDAG::getCommutedVectorShuffle(), is128BitUnpackShuffleMask(), isHorizontalBinOp(), lowerShuffleAsBlend(), lowerShuffleAsLanePermuteAndRepeatedMask(), lowerShuffleOfExtractsAsVperm(), lowerShuffleWithSHUFPS(), lowerShuffleWithUNPCK(), lowerVECTOR_SHUFFLE(), llvm::HexagonTargetLowering::LowerVECTOR_SHUFFLE(), matchShuffleAsInsertPS(), matchShuffleWithUNPCK(), and replaceShuffleOfInsert().
|
inline |
Definition at line 1545 of file SelectionDAGNodes.h.
References llvm::SDNode::getValueType(), and llvm::EVT::getVectorNumElements().
Referenced by combineConcatVectorOfShuffleAndItsOperands(), combineShuffleOfBitcast(), combineShuffleOfConcatUndef(), combineShuffleOfScalars(), combineShuffleOfSplatVal(), combineShuffleToAnyExtendVectorInreg(), combineShuffleToZeroExtendVectorInReg(), combineTruncationShuffle(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), foldShuffleOfConcatUndefs(), formSplatFromShuffles(), llvm::SelectionDAG::getCommutedVectorShuffle(), LowerVECTOR_SHUFFLE(), lowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLE_i1(), narrowShuffle(), partitionShuffleOfConcats(), PerformSplittingToNarrowingStores(), replaceShuffleOfInsert(), and simplifyShuffleOfShuffle().
|
inline |
Definition at line 1550 of file SelectionDAGNodes.h.
References assert(), llvm::SDNode::getValueType(), and Idx.
Referenced by AddNodeIDCustom(), llvm::PPC::getSplatIdxForPPCMnemonics(), getUnderlyingExtractedFromVec(), llvm::PPC::isVSLDOIShuffleMask(), llvm::SelectionDAG::matchBinOpReduction(), performExtractVectorEltCombine(), and PerformVECTOR_SHUFFLECombine().
|
inline |
Definition at line 1557 of file SelectionDAGNodes.h.
References assert(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isSplat().
Referenced by LowerVECTOR_SHUFFLE(), and lowerVECTOR_SHUFFLE().
|
inline |
Definition at line 1555 of file SelectionDAGNodes.h.
References llvm::SDNode::getValueType(), and isSplatMask().
Referenced by combineShuffleOfSplatVal(), getSplatIndex(), LowerVECTOR_SHUFFLE(), and lowerVECTOR_SHUFFLE().
Definition at line 12217 of file SelectionDAG.cpp.
References llvm::EVT::getVectorNumElements(), and Idx.
Referenced by llvm::AArch64TargetLowering::isShuffleMaskLegal(), llvm::ARMTargetLowering::isShuffleMaskLegal(), llvm::RISCVTargetLowering::isShuffleMaskLegal(), and isSplat().
|
friend |
Definition at line 1539 of file SelectionDAGNodes.h.