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 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 358 of file DerivedTypes.h.
Methods for support type inquiry through isa, cast, and dyn_cast.
Reimplemented from llvm::SequentialType.
Definition at line 417 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 710 of file Type.cpp.
References llvm::Type::getContext(), isValidElementType(), llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::TypeAllocator, and llvm::LLVMContextImpl::VectorTypes.
Referenced by llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), DecodeFixedType(), FoldBitCast(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::DataLayout::getIntPtrType(), llvm::BoUpSLP::getScalarizationCost(), llvm::EVT::getTypeForEVT(), isVectorPromotionViable(), LLVMVectorType(), llvm::CmpInst::makeCmpResultType(), OptimizeIntToFloatBitCast(), OptimizeVectorResize(), llvm::UpgradeIntrinsicCall(), UpgradeSSE41Function(), 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 412 of file DerivedTypes.h.
| 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 385 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::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 374 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 408 of file DerivedTypes.h.
Referenced by llvm::SelectInst::areInvalidOperands(), BitCastConstantVector(), emitGlobalConstantVector(), extractVector(), FindScalarElement(), FoldBitCast(), llvm::Constant::getAllOnesValue(), llvm::ExecutionEngine::getConstantValue(), llvm::EVT::getEVT(), getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), getInteger(), llvm::ConstantInt::getTrue(), getTruncatedElementVectorType(), llvm::DataLayout::getTypeSizeInBits(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::getVT(), insertVector(), llvm::ShuffleVectorInst::isValidOperands(), isVectorPromotionViable(), llvm::ExecutionEngine::LoadValueFromMemory(), OptimizeIntegerToVectorInsertions(), OptimizeVectorResize(), llvm::TypePrinting::print(), llvm::InstCombiner::visitCallInst(), 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 395 of file DerivedTypes.h.
References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().
Referenced by DecodeFixedType().
isValidElementType - Return true if the specified type is valid as a element type.
Definition at line 725 of file Type.cpp.
References llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::Type::isPointerTy().
Referenced by get().