LLVM API Documentation
#include <DerivedTypes.h>
Public Member Functions | |
unsigned | getNumElements () const |
Return the number of elements in the Vector type. | |
unsigned | getBitWidth () const |
Return the number of bits in the Vector type. Returns zero when the vector is a vector of pointers. | |
Static Public Member Functions | |
static VectorType * | get (Type *ElementType, unsigned NumElements) |
static VectorType * | getInteger (VectorType *VTy) |
static VectorType * | getExtendedElementVectorType (VectorType *VTy) |
static VectorType * | getTruncatedElementVectorType (VectorType *VTy) |
static VectorType * | getHalfElementsVectorType (VectorType *VTy) |
static VectorType * | getDoubleElementsVectorType (VectorType *VTy) |
static bool | isValidElementType (Type *ElemTy) |
static bool | classof (const Type *T) |
Methods for support type inquiry through isa, cast, and dyn_cast. |
VectorType - Class to represent vector types.
Definition at line 355 of file DerivedTypes.h.
static bool llvm::VectorType::classof | ( | const Type * | T | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast.
Reimplemented from llvm::SequentialType.
Definition at line 434 of file DerivedTypes.h.
References llvm::Type::getTypeID(), and llvm::Type::VectorTyID.
VectorType * VectorType::get | ( | Type * | ElementType, |
unsigned | NumElements | ||
) | [static] |
VectorType::get - This static method is the primary way to construct an VectorType.
Definition at line 712 of file Type.cpp.
References llvm::Type::getContext(), isValidElementType(), llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::TypeAllocator, and llvm::LLVMContextImpl::VectorTypes.
Referenced by arrayTypeToVecType(), BuildNew(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), DecodeFixedType(), FoldBitCast(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::DataLayout::getIntPtrType(), llvm::EVT::getTypeForEVT(), insertSinCosCall(), LLVMVectorType(), llvm::CmpInst::makeCmpResultType(), OptimizeIntToFloatBitCast(), OptimizeVectorResize(), SimplifyGEPInst(), llvm::UpgradeIntrinsicCall(), UpgradeSSE41Function(), llvm::InstCombiner::visitAddrSpaceCast(), llvm::InstCombiner::visitIntToPtr(), and llvm::InstCombiner::visitPtrToInt().
unsigned llvm::VectorType::getBitWidth | ( | ) | const [inline] |
Return the number of bits in the Vector type. Returns zero when the vector is a vector of pointers.
Definition at line 429 of file DerivedTypes.h.
static VectorType* llvm::VectorType::getDoubleElementsVectorType | ( | VectorType * | VTy | ) | [inline, static] |
VectorType::getDoubleElementsVectorType - This static method returns a VectorType with twice as many elements as the input type and the same element type.
Definition at line 415 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::SequentialType::getElementType(), and getNumElements().
static VectorType* llvm::VectorType::getExtendedElementVectorType | ( | VectorType * | VTy | ) | [inline, static] |
VectorType::getExtendedElementVectorType - This static method is like getInteger except that the element types are twice as wide as the elements in the input type.
Definition at line 382 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().
Referenced by DecodeFixedType().
static VectorType* llvm::VectorType::getHalfElementsVectorType | ( | VectorType * | VTy | ) | [inline, static] |
VectorType::getHalfElementsVectorType - This static method returns a VectorType with half as many elements as the input type and the same element type.
Definition at line 404 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::SequentialType::getElementType(), and getNumElements().
Referenced by DecodeFixedType().
static VectorType* llvm::VectorType::getInteger | ( | VectorType * | VTy | ) | [inline, static] |
VectorType::getInteger - This static method gets a VectorType with the same number of elements as the input type, and the element type is an integer type of the same width as the input element type.
Definition at line 371 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().
unsigned llvm::VectorType::getNumElements | ( | ) | const [inline] |
Return the number of elements in the Vector type.
Definition at line 425 of file DerivedTypes.h.
Referenced by llvm::SelectInst::areInvalidOperands(), BitCastConstantVector(), ConstantFoldVectorCall(), emitGlobalConstantVector(), extractVector(), FindScalarElement(), FoldBitCast(), llvm::Constant::getAllOnesValue(), llvm::ExecutionEngine::getConstantValue(), getDoubleElementsVectorType(), llvm::EVT::getEVT(), getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), getHalfElementsVectorType(), getInteger(), llvm::ConstantInt::getTrue(), getTruncatedElementVectorType(), llvm::DataLayout::getTypeSizeInBits(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::getVT(), insertVector(), llvm::ShuffleVectorInst::isValidOperands(), isVectorPromotionViableForSlice(), isZero(), llvm::ExecutionEngine::LoadValueFromMemory(), OptimizeIntegerToVectorInsertions(), OptimizeVectorResize(), llvm::TypePrinting::print(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitInsertElementInst(), and WriteTypeTable().
static VectorType* llvm::VectorType::getTruncatedElementVectorType | ( | VectorType * | VTy | ) | [inline, static] |
VectorType::getTruncatedElementVectorType - This static method is like getInteger except that the element types are half as wide as the elements in the input type.
Definition at line 392 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().
Referenced by DecodeFixedType().
bool VectorType::isValidElementType | ( | Type * | ElemTy | ) | [static] |
isValidElementType - Return true if the specified type is valid as a element type.
Definition at line 727 of file Type.cpp.
References llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::Type::isPointerTy().
Referenced by get().