LLVM  9.0.0svn
Macros | Functions
LegalizeVectorTypes.cpp File Reference
#include "LegalizeTypes.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for LegalizeVectorTypes.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "legalize-types"
 

Functions

static SDValue CollectOpsToWiden (SelectionDAG &DAG, const TargetLowering &TLI, SmallVectorImpl< SDValue > &ConcatOps, unsigned ConcatEnd, EVT VT, EVT MaxVT, EVT WidenVT)
 
static bool isLogicalMaskOp (unsigned Opcode)
 
static bool isSETCCorConvertedSETCC (SDValue N)
 
static EVT FindMemType (SelectionDAG &DAG, const TargetLowering &TLI, unsigned Width, EVT WidenVT, unsigned Align=0, unsigned WidenEx=0)
 
static SDValue BuildVectorFromScalar (SelectionDAG &DAG, EVT VecTy, SmallVectorImpl< SDValue > &LdOps, unsigned Start, unsigned End)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "legalize-types"

Definition at line 28 of file LegalizeVectorTypes.cpp.

Function Documentation

◆ BuildVectorFromScalar()

static SDValue BuildVectorFromScalar ( SelectionDAG DAG,
EVT  VecTy,
SmallVectorImpl< SDValue > &  LdOps,
unsigned  Start,
unsigned  End 
)
static

Definition at line 4410 of file LegalizeVectorTypes.cpp.

◆ CollectOpsToWiden()

static SDValue CollectOpsToWiden ( SelectionDAG DAG,
const TargetLowering TLI,
SmallVectorImpl< SDValue > &  ConcatOps,
unsigned  ConcatEnd,
EVT  VT,
EVT  MaxVT,
EVT  WidenVT 
)
static

Definition at line 2710 of file LegalizeVectorTypes.cpp.

References llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, assert(), llvm::ISD::BITCAST, llvm::EVT::bitsEq(), llvm::TargetLoweringBase::canOpTrap(), llvm::ISD::CONCAT_VECTORS, llvm::SmallVectorTemplateCommon< T >::data(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MaskedLoadSDNode::getBasePtr(), llvm::MaskedGatherScatterSDNode::getBasePtr(), llvm::SelectionDAG::getBuildVector(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::LoadSDNode::getExtensionType(), llvm::MaskedLoadSDNode::getExtensionType(), llvm::SDNode::getFlags(), llvm::MaskedGatherScatterSDNode::getIndex(), llvm::MaskedLoadSDNode::getMask(), llvm::MaskedGatherScatterSDNode::getMask(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::MaskedLoadSDNode::getPassThru(), llvm::MaskedGatherSDNode::getPassThru(), llvm::EVT::getScalarType(), llvm::MaskedGatherScatterSDNode::getScale(), llvm::EVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::getVectorIdxTy(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::MaskedLoadSDNode::isExpandingLoad(), llvm::TargetLoweringBase::isTypeLegal(), llvm::SDValue::isUndef(), llvm::EVT::isVector(), llvm_unreachable, llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), N, llvm::ISD::NON_EXTLOAD, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::SmallVectorBase::size(), llvm::ISD::TokenFactor, llvm::TargetLoweringBase::TypeExpandFloat, llvm::TargetLoweringBase::TypeExpandInteger, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypePromoteFloat, llvm::TargetLoweringBase::TypePromoteInteger, llvm::TargetLoweringBase::TypeScalarizeVector, llvm::TargetLoweringBase::TypeSoftenFloat, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, llvm::SelectionDAG::UnrollVectorOp(), llvm::MVT::x86mmx, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.

◆ FindMemType()

static EVT FindMemType ( SelectionDAG DAG,
const TargetLowering TLI,
unsigned  Width,
EVT  WidenVT,
unsigned  Align = 0,
unsigned  WidenEx = 0 
)
static

◆ isLogicalMaskOp()

static bool isLogicalMaskOp ( unsigned  Opcode)
inlinestatic

Definition at line 3536 of file LegalizeVectorTypes.cpp.

References llvm::ISD::AND, llvm::ISD::OR, and llvm::ISD::XOR.

Referenced by isSETCCorConvertedSETCC().

◆ isSETCCorConvertedSETCC()

static bool isSETCCorConvertedSETCC ( SDValue  N)
inlinestatic

Definition at line 3549 of file LegalizeVectorTypes.cpp.

References llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, assert(), llvm::ISD::BITCAST, llvm::EVT::changeVectorElementTypeToInteger(), llvm::ISD::CONCAT_VECTORS, llvm::dbgs(), llvm::SDNode::dump(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FCOPYSIGN, llvm::MVT::FIRST_VECTOR_VALUETYPE, llvm::ISD::FP_EXTEND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::SelectionDAG::getAllOnesConstant(), llvm::MaskedStoreSDNode::getBasePtr(), llvm::MaskedGatherScatterSDNode::getBasePtr(), llvm::SelectionDAG::getBuildVector(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::SDNode::getFlags(), llvm::EVT::getHalfNumVectorElementsVT(), llvm::MaskedGatherScatterSDNode::getIndex(), llvm::MaskedStoreSDNode::getMask(), llvm::MaskedGatherScatterSDNode::getMask(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), llvm::MaskedGatherScatterSDNode::getScale(), llvm::TargetLoweringBase::getSetCCResultType(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::EVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeAction(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::MaskedStoreSDNode::getValue(), llvm::MaskedScatterSDNode::getValue(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::getVectorIdxTy(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::i1, llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::ISD::isBuildVectorOfConstantSDNodes(), llvm::EVT::isByteSized(), llvm::MaskedStoreSDNode::isCompressingStore(), llvm::EVT::isInteger(), isLogicalMaskOp(), llvm::EVT::isPow2VectorType(), llvm::isPowerOf2_64(), llvm::StoreSDNode::isTruncatingStore(), llvm::TargetLoweringBase::isTypeLegal(), llvm::SDValue::isUndef(), llvm::SDNode::isUndef(), llvm::EVT::isVector(), llvm::MVT::LAST_VECTOR_VALUETYPE, LLVM_DEBUG, llvm_unreachable, llvm::BitmaskEnumDetail::Mask(), llvm::ISD::MGATHER, llvm::ISD::MSCATTER, llvm::ISD::MSTORE, N, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::TargetLowering::scalarizeVectorStore(), llvm::MCID::Select, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::ISD::SINT_TO_FP, Size, llvm::SmallVectorBase::size(), llvm::ARM_MB::ST, llvm::ISD::STORE, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, llvm::ISD::UINT_TO_FP, llvm::SelectionDAG::UnrollVectorOp(), llvm::ISD::VECREDUCE_ADD, llvm::ISD::VECREDUCE_AND, llvm::ISD::VECREDUCE_FADD, llvm::ISD::VECREDUCE_FMAX, llvm::ISD::VECREDUCE_FMIN, llvm::ISD::VECREDUCE_FMUL, llvm::ISD::VECREDUCE_MUL, llvm::ISD::VECREDUCE_OR, llvm::ISD::VECREDUCE_SMAX, llvm::ISD::VECREDUCE_SMIN, llvm::ISD::VECREDUCE_UMAX, llvm::ISD::VECREDUCE_UMIN, llvm::ISD::VECREDUCE_XOR, llvm::ISD::VSELECT, llvm::SelectionDAG::WidenVector(), llvm::MVT::x86mmx, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.