class BuildVectorSDNode
Declaration
class BuildVectorSDNode : public SDNode { /* full declaration omitted */ };
Description
A "pseudo-class" with methods for operating on BUILD_VECTORs.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1968
Inherits from: SDNode
Member Variables
Inherited from SDNode:
Method Overview
- public BuildVectorSDNode()
- public static bool classof(const llvm::SDNode * N)
- public llvm::ConstantFPSDNode * getConstantFPSplatNode(const llvm::APInt & DemandedElts, llvm::BitVector * UndefElements = nullptr) const
- public llvm::ConstantFPSDNode * getConstantFPSplatNode(llvm::BitVector * UndefElements = nullptr) const
- public int32_t getConstantFPSplatPow2ToLog2Int(llvm::BitVector * UndefElements, uint32_t BitWidth) const
- public bool getConstantRawBits(bool IsLittleEndian, unsigned int DstEltSizeInBits, SmallVectorImpl<llvm::APInt> & RawBitElements, llvm::BitVector & UndefElements) const
- public llvm::ConstantSDNode * getConstantSplatNode(const llvm::APInt & DemandedElts, llvm::BitVector * UndefElements = nullptr) const
- public llvm::ConstantSDNode * getConstantSplatNode(llvm::BitVector * UndefElements = nullptr) const
- public bool getRepeatedSequence(const llvm::APInt & DemandedElts, SmallVectorImpl<llvm::SDValue> & Sequence, llvm::BitVector * UndefElements = nullptr) const
- public bool getRepeatedSequence(SmallVectorImpl<llvm::SDValue> & Sequence, llvm::BitVector * UndefElements = nullptr) const
- public llvm::SDValue getSplatValue(const llvm::APInt & DemandedElts, llvm::BitVector * UndefElements = nullptr) const
- public llvm::SDValue getSplatValue(llvm::BitVector * UndefElements = nullptr) const
- public bool isConstant() const
- public Optional<std::pair<APInt, APInt>> isConstantSequence() const
- public bool isConstantSplat(llvm::APInt & SplatValue, llvm::APInt & SplatUndef, unsigned int & SplatBitSize, bool & HasAnyUndefs, unsigned int MinSplatBits = 0, bool isBigEndian = false) const
- public static void recastRawBits(bool IsLittleEndian, unsigned int DstEltSizeInBits, SmallVectorImpl<llvm::APInt> & DstBitElements, ArrayRef<llvm::APInt> SrcBitElements, llvm::BitVector & DstUndefElements, const llvm::BitVector & SrcUndefElements)
Inherited from SDNode:
- protected DropOperands
- public Profile
- public addUse
- public areOnlyUsersOf
- public dump
- public dump
- public dumpr
- public dumpr
- public dumprFull
- public dumprWithDepth
- public getConstantOperandAPInt
- public getConstantOperandVal
- public getDebugLoc
- public getFlags
- public getGluedNode
- public getGluedUser
- public getHasDebugValue
- public getIROrder
- public getIndexedModeName
- public getMachineOpcode
- public getMaxNumOperands
- public getNodeId
- public getNumOperands
- public getNumValues
- public getOpcode
- public getOperand
- public getOperationName
- protected getSDVTList
- public getSimpleValueType
- public getVTList
- public getValueSizeInBits
- public getValueType
- public hasAnyUseOfValue
- public hasNUsesOfValue
- public hasOneUse
- public hasPredecessor
- public hasPredecessorHelper
- public intersectFlagsWith
- public isDivergent
- public isMachineOpcode
- public isMemIntrinsic
- public isOnlyUserOf
- public isOperandOf
- public isPredecessorOf
- public isStrictFPOpcode
- public isTargetMemoryOpcode
- public isTargetOpcode
- public isTargetStrictFPOpcode
- public isUndef
- public isVPOpcode
- public op_begin
- public op_end
- public op_values
- public ops
- public print
- public print_details
- public print_types
- public printr
- public printrFull
- public printrWithDepth
- public setDebugLoc
- public setFlags
- public setHasDebugValue
- public setIROrder
- public setNodeId
- public use_begin
- public use_empty
- public use_end
- public use_size
- public uses
- public uses
- public value_begin
- public value_end
- public values
Inherited from FoldingSetBase::Node:
Methods
¶BuildVectorSDNode()
BuildVectorSDNode()
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1971
¶static bool classof(const llvm::SDNode* N)
static bool classof(const llvm::SDNode* N)
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2097
Parameters
- const llvm::SDNode* N
¶llvm::ConstantFPSDNode* getConstantFPSplatNode(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
llvm::ConstantFPSDNode* getConstantFPSplatNode(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
Description
Returns the demanded splatted constant FP or null if this is not a constant FP splat. The DemandedElts mask indicates the elements that must be in the 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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2054
Parameters
- const llvm::APInt& DemandedElts
- llvm::BitVector* UndefElements = nullptr
¶llvm::ConstantFPSDNode* getConstantFPSplatNode(
llvm::BitVector* UndefElements =
nullptr) const
llvm::ConstantFPSDNode* getConstantFPSplatNode(
llvm::BitVector* UndefElements =
nullptr) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2063
Parameters
- llvm::BitVector* UndefElements = nullptr
¶int32_t getConstantFPSplatPow2ToLog2Int(
llvm::BitVector* UndefElements,
uint32_t BitWidth) const
int32_t getConstantFPSplatPow2ToLog2Int(
llvm::BitVector* UndefElements,
uint32_t BitWidth) const
Description
If this is a constant FP splat and the splatted constant FP is an exact power or 2, return the log base 2 integer value. Otherwise, return -1. The BitWidth specifies the necessary bit precision.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2070
Parameters
- llvm::BitVector* UndefElements
- uint32_t BitWidth
¶bool getConstantRawBits(
bool IsLittleEndian,
unsigned int DstEltSizeInBits,
SmallVectorImpl<llvm::APInt>& RawBitElements,
llvm::BitVector& UndefElements) const
bool getConstantRawBits(
bool IsLittleEndian,
unsigned int DstEltSizeInBits,
SmallVectorImpl<llvm::APInt>& RawBitElements,
llvm::BitVector& UndefElements) const
Description
Extract the raw bit data from a build vector of Undef, Constant or ConstantFP node elements. Each raw bit element will be \p DstEltSizeInBits wide, undef elements are treated as zero, and entirely undefined elements are flagged in \p UndefElements.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2077
Parameters
- bool IsLittleEndian
- unsigned int DstEltSizeInBits
- SmallVectorImpl<llvm::APInt>& RawBitElements
- llvm::BitVector& UndefElements
¶llvm::ConstantSDNode* getConstantSplatNode(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
llvm::ConstantSDNode* getConstantSplatNode(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
Description
Returns the demanded splatted constant or null if this is not a constant splat. The DemandedElts mask indicates the elements that must be in the 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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2036
Parameters
- const llvm::APInt& DemandedElts
- llvm::BitVector* UndefElements = nullptr
¶llvm::ConstantSDNode* getConstantSplatNode(
llvm::BitVector* UndefElements =
nullptr) const
llvm::ConstantSDNode* getConstantSplatNode(
llvm::BitVector* UndefElements =
nullptr) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2045
Parameters
- llvm::BitVector* UndefElements = nullptr
¶bool getRepeatedSequence(
const llvm::APInt& DemandedElts,
SmallVectorImpl<llvm::SDValue>& Sequence,
llvm::BitVector* UndefElements =
nullptr) const
bool getRepeatedSequence(
const llvm::APInt& DemandedElts,
SmallVectorImpl<llvm::SDValue>& Sequence,
llvm::BitVector* UndefElements =
nullptr) const
Description
Find the shortest repeating sequence of values in the build vector. e.g. { u, X, u, X, u, u, X, u } -> { X } { X, Y, u, Y, u, u, X, u } -> { X, Y } Currently this must be a power-of-2 build vector. The DemandedElts mask indicates the elements that must be present, undemanded elements in Sequence may be null (SDValue()). If passed a non-null UndefElements bitvector, it will resize it to match the original vector width and set the bits where elements are undef. If result is false, Sequence will be empty.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2013
Parameters
- const llvm::APInt& DemandedElts
- SmallVectorImpl<llvm::SDValue>& Sequence
- llvm::BitVector* UndefElements = nullptr
¶bool getRepeatedSequence(
SmallVectorImpl<llvm::SDValue>& Sequence,
llvm::BitVector* UndefElements =
nullptr) const
bool getRepeatedSequence(
SmallVectorImpl<llvm::SDValue>& Sequence,
llvm::BitVector* UndefElements =
nullptr) const
Description
Find the shortest repeating sequence of values in the build vector. e.g. { u, X, u, X, u, u, X, u } -> { X } { X, Y, u, Y, u, u, X, u } -> { X, Y } Currently this must be a power-of-2 build vector. If passed a non-null UndefElements bitvector, it will resize it to match the original vector width and set the bits where elements are undef. If result is false, Sequence will be empty.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2026
Parameters
- SmallVectorImpl<llvm::SDValue>& Sequence
- llvm::BitVector* UndefElements = nullptr
¶llvm::SDValue getSplatValue(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
llvm::SDValue getSplatValue(
const llvm::APInt& DemandedElts,
llvm::BitVector* UndefElements =
nullptr) const
Description
Returns the demanded splatted value or a null value if this is not a splat. The DemandedElts mask indicates the elements that must be in the 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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1993
Parameters
- const llvm::APInt& DemandedElts
- llvm::BitVector* UndefElements = nullptr
¶llvm::SDValue getSplatValue(
llvm::BitVector* UndefElements =
nullptr) const
llvm::SDValue getSplatValue(
llvm::BitVector* UndefElements =
nullptr) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2000
Parameters
- llvm::BitVector* UndefElements = nullptr
¶bool isConstant() const
bool isConstant() const
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2081
¶Optional<std::pair<APInt, APInt>>
isConstantSequence() const
Optional<std::pair<APInt, APInt>>
isConstantSequence() const
Description
If this BuildVector is constant and represents the numerical series , a+n, a+2n, a+3n, ...> where a is integer and n is a non-zero integer, the value ,n> is returned.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2086
¶bool isConstantSplat(
llvm::APInt& SplatValue,
llvm::APInt& SplatUndef,
unsigned int& SplatBitSize,
bool& HasAnyUndefs,
unsigned int MinSplatBits = 0,
bool isBigEndian = false) const
bool isConstantSplat(
llvm::APInt& SplatValue,
llvm::APInt& SplatUndef,
unsigned int& SplatBitSize,
bool& HasAnyUndefs,
unsigned int MinSplatBits = 0,
bool isBigEndian = false) const
Description
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.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1982
Parameters
- llvm::APInt& SplatValue
- llvm::APInt& SplatUndef
- unsigned int& SplatBitSize
- bool& HasAnyUndefs
- unsigned int MinSplatBits = 0
- bool isBigEndian = false
¶static void recastRawBits(
bool IsLittleEndian,
unsigned int DstEltSizeInBits,
SmallVectorImpl<llvm::APInt>& DstBitElements,
ArrayRef<llvm::APInt> SrcBitElements,
llvm::BitVector& DstUndefElements,
const llvm::BitVector& SrcUndefElements)
static void recastRawBits(
bool IsLittleEndian,
unsigned int DstEltSizeInBits,
SmallVectorImpl<llvm::APInt>& DstBitElements,
ArrayRef<llvm::APInt> SrcBitElements,
llvm::BitVector& DstUndefElements,
const llvm::BitVector& SrcUndefElements)
Description
Recast bit data \p SrcBitElements to \p DstEltSizeInBits wide elements. Undef elements are treated as zero, and entirely undefined elements are flagged in \p DstUndefElements.
Declared at: llvm/include/llvm/CodeGen/SelectionDAGNodes.h:2091
Parameters
- bool IsLittleEndian
- unsigned int DstEltSizeInBits
- SmallVectorImpl<llvm::APInt>& DstBitElements
- ArrayRef<llvm::APInt> SrcBitElements
- llvm::BitVector& DstUndefElements
- const llvm::BitVector& SrcUndefElements