[#llvm-ScalableVectorType] = xref:llvm.adoc[llvm]::ScalableVectorType :relfileprefix: ../ :mrdocs: Class to represent scalable SIMD vectors == Synopsis Declared in `<llvm/IR/DerivedTypes.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ScalableVectorType : public xref:llvm/VectorType.adoc[VectorType] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/VectorType.adoc[VectorType]` | Base class of all SIMD vector types |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/Type/subtype_iterator.adoc[`subtype_iterator`] | Iterator over this type's contained (subtype) types. | xref:llvm/Type/subtype_reverse_iterator.adoc[`subtype_reverse_iterator`] | Reverse iterator over contained (subtype) types. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/Type/TypeID.adoc[`TypeID`] | Identifiers for all base types in the LLVM type system. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/VectorType/operator_assign.adoc[`operator=`] [.small]#[deleted]# | Copy assignment is deleted; vector types are uniqued. | xref:llvm/Type/canLosslesslyBitCastTo.adoc[`canLosslesslyBitCastTo`] | Return true if this type could be converted with a lossless BitCast to Ty. | xref:llvm/Type/containsNonGlobalTargetExtType-0c.adoc[`containsNonGlobalTargetExtType`] | Return true if this type is or contains a target extension type that disallows being used as a global. | xref:llvm/Type/containsNonLocalTargetExtType-01.adoc[`containsNonLocalTargetExtType`] | Return true if this type is or contains a target extension type that disallows being used as a local. | xref:llvm/Type/dump.adoc[`dump`] | Dump this type to stderr for debugging. | xref:llvm/Type/getArrayElementType.adoc[`getArrayElementType`] | Return the element type of this array type. | xref:llvm/Type/getArrayNumElements.adoc[`getArrayNumElements`] | Return the number of elements in this array type. | xref:llvm/Type/getByteBitWidth.adoc[`getByteBitWidth`] | Return the bit width of this byte type (or of its scalar element). | xref:llvm/Type/getContainedType.adoc[`getContainedType`] | Return the type contained at index `i` in this derived type. | xref:llvm/Type/getContext.adoc[`getContext`] | Return the LLVMContext in which this type was uniqued. | xref:llvm/VectorType/getElementCount.adoc[`getElementCount`] | Return an ElementCount instance to represent the (possibly scalable) number of elements in the vector. | xref:llvm/VectorType/getElementType.adoc[`getElementType`] | Return the element type of this vector. | xref:llvm/Type/getExtendedType.adoc[`getExtendedType`] | Given scalar/vector integer type, returns a type with elements twice as wide as in the original type. For vectors, preserves element count. | xref:llvm/Type/getFPMantissaWidth.adoc[`getFPMantissaWidth`] | Return the width of the mantissa of this floating‐point type. | xref:llvm/Type/getFltSemantics.adoc[`getFltSemantics`] | Return the floating‐point semantics for this floating‐point type. | xref:llvm/Type/getFunctionNumParams.adoc[`getFunctionNumParams`] | Return the number of fixed parameters of this function type. | xref:llvm/Type/getFunctionParamType.adoc[`getFunctionParamType`] | Return the type of formal parameter `i` of this function type. | xref:llvm/Type/getIntegerBitWidth.adoc[`getIntegerBitWidth`] | Return the bit width of this integer type. | xref:llvm/ScalableVectorType/getMinNumElements.adoc[`getMinNumElements`] | Get the minimum number of elements in this vector. The actual number of elements in the vector is an integer multiple of this value. | xref:llvm/Type/getNumContainedTypes.adoc[`getNumContainedTypes`] | Return the number of types in the derived type. | xref:llvm/Type/getPointerAddressSpace.adoc[`getPointerAddressSpace`] | Get the address space of this pointer or pointer vector type. | xref:llvm/Type/getPrimitiveSizeInBits.adoc[`getPrimitiveSizeInBits`] | Return the basic size of this type if it is a primitive type. | xref:llvm/Type/getScalarSizeInBits.adoc[`getScalarSizeInBits`] | If this is a vector type, return the getPrimitiveSizeInBits value for the element type. Otherwise return the getPrimitiveSizeInBits value for this type. | xref:llvm/Type/getScalarType.adoc[`getScalarType`] | If this is a vector type, return the element type, otherwise return 'this'. | xref:llvm/Type/getStructElementType.adoc[`getStructElementType`] | Return the type of element `N` in this struct type. | xref:llvm/Type/getStructName.adoc[`getStructName`] | Return the name of this identified struct type. | xref:llvm/Type/getStructNumElements.adoc[`getStructNumElements`] | Return the number of elements in this struct type. | xref:llvm/Type/getTargetExtName.adoc[`getTargetExtName`] | Return the name of this target extension type. | xref:llvm/Type/getTruncatedType.adoc[`getTruncatedType`] | Given scalar/vector integer type, returns a type with elements half as wide as in the original type. For vectors, preserves element count. | xref:llvm/Type/getTypeID.adoc[`getTypeID`] | Return the type id for the type. This will return one of the TypeID enum elements defined above. | xref:llvm/Type/getWithNewBitWidth.adoc[`getWithNewBitWidth`] | Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes. | xref:llvm/Type/getWithNewType.adoc[`getWithNewType`] | Given vector type, change the element type, whilst keeping the old number of elements. For non‐vectors simply returns `EltTy.` | xref:llvm/Type/is16bitFPTy.adoc[`is16bitFPTy`] | Return true if this is a 16‐bit float type. | xref:llvm/Type/isAggregateType.adoc[`isAggregateType`] | Return true if the type is an aggregate type. | xref:llvm/Type/isArrayTy.adoc[`isArrayTy`] | True if this is an instance of ArrayType. | xref:llvm/Type/isBFloatTy.adoc[`isBFloatTy`] | Return true if this is 'bfloat', a 16‐bit bfloat type. | xref:llvm/Type/isByteOrByteVectorTy-08.adoc[`isByteOrByteVectorTy`] | `isByteOrByteVectorTy` overloads | xref:llvm/Type/isByteTy-06f.adoc[`isByteTy`] | `isByteTy` overloads | xref:llvm/Type/isDoubleTy.adoc[`isDoubleTy`] | Return true if this is 'double', a 64‐bit IEEE fp type. | xref:llvm/Type/isEmptyTy.adoc[`isEmptyTy`] | Return true if this type is empty, that is, it has no elements or all of its elements are empty. | xref:llvm/Type/isFP128Ty.adoc[`isFP128Ty`] | Return true if this is 'fp128'. | xref:llvm/Type/isFPOrFPVectorTy.adoc[`isFPOrFPVectorTy`] | Return true if this is a FP type or a vector of FP. | xref:llvm/Type/isFirstClassType.adoc[`isFirstClassType`] | Return true if the type is "first class", meaning it is a valid type for a Value. | xref:llvm/Type/isFloatTy.adoc[`isFloatTy`] | Return true if this is 'float', a 32‐bit IEEE fp type. | xref:llvm/Type/isFloatingPointTy.adoc[`isFloatingPointTy`] | Return true if this is one of the floating‐point types. | xref:llvm/Type/isFunctionTy.adoc[`isFunctionTy`] | True if this is an instance of FunctionType. | xref:llvm/Type/isFunctionVarArg.adoc[`isFunctionVarArg`] | Return true if this function type is variadic. | xref:llvm/Type/isHalfTy.adoc[`isHalfTy`] | Return true if this is 'half', a 16‐bit IEEE fp type. | xref:llvm/Type/isIEEELikeFPTy.adoc[`isIEEELikeFPTy`] | Return true if this is a well‐behaved IEEE‐like type, which has a IEEE compatible layout, and does not have non‐IEEE values, such as x86_fp80's unnormal values. | xref:llvm/Type/isIntOrIntVectorTy-0a.adoc[`isIntOrIntVectorTy`] | `isIntOrIntVectorTy` overloads | xref:llvm/Type/isIntOrPtrTy.adoc[`isIntOrPtrTy`] | Return true if this is an integer type or a pointer type. | xref:llvm/Type/isIntegerTy-01.adoc[`isIntegerTy`] | `isIntegerTy` overloads | xref:llvm/Type/isLabelTy.adoc[`isLabelTy`] | Return true if this is 'label'. | xref:llvm/Type/isMetadataTy.adoc[`isMetadataTy`] | Return true if this is 'metadata'. | xref:llvm/Type/isMultiUnitFPType.adoc[`isMultiUnitFPType`] | Return true if this is a multi‐unit floating‐point type. | xref:llvm/Type/isPPC_FP128Ty.adoc[`isPPC_FP128Ty`] | Return true if this is powerpc long double. | xref:llvm/Type/isPointerTy.adoc[`isPointerTy`] | True if this is an instance of PointerType. | xref:llvm/Type/isPtrOrPtrVectorTy.adoc[`isPtrOrPtrVectorTy`] | Return true if this is a pointer type or a vector of pointer types. | xref:llvm/Type/isRISCVVectorTupleTy.adoc[`isRISCVVectorTupleTy`] | True if this is an instance of TargetExtType of RISC‐V vector tuple. | xref:llvm/Type/isScalableTargetExtTy.adoc[`isScalableTargetExtTy`] | Return true if this is a target extension type with a scalable layout. | xref:llvm/Type/isScalableTy-09.adoc[`isScalableTy`] | `isScalableTy` overloads | xref:llvm/Type/isSingleValueType.adoc[`isSingleValueType`] | Return true if the type is a valid type for a register in codegen. This includes all first‐class types except struct and array types. | xref:llvm/Type/isSized.adoc[`isSized`] | Return true if it makes sense to take the size of this type. | xref:llvm/Type/isStructTy.adoc[`isStructTy`] | True if this is an instance of StructType. | xref:llvm/Type/isTargetExtTy.adoc[`isTargetExtTy`] | Return true if this is a target extension type. | xref:llvm/Type/isTokenLikeTy.adoc[`isTokenLikeTy`] | Returns true if this is 'token' or a token‐like target type.s | xref:llvm/Type/isTokenTy.adoc[`isTokenTy`] | Return true if this is 'token'. | xref:llvm/Type/isVectorTy.adoc[`isVectorTy`] | True if this is an instance of VectorType. | xref:llvm/Type/isVoidTy.adoc[`isVoidTy`] | Return true if this is 'void'. | xref:llvm/Type/isX86_AMXTy.adoc[`isX86_AMXTy`] | Return true if this is X86 AMX. | xref:llvm/Type/isX86_FP80Ty.adoc[`isX86_FP80Ty`] | Return true if this is x86 long double. | xref:llvm/Type/print.adoc[`print`] | Print the current type. | xref:llvm/Type/subtype_begin.adoc[`subtype_begin`] | Iterator to the first contained (subtype) type. | xref:llvm/Type/subtype_end.adoc[`subtype_end`] | Iterator past the last contained (subtype) type. | xref:llvm/Type/subtype_rbegin.adoc[`subtype_rbegin`] | Reverse iterator to the last contained (subtype) type. | xref:llvm/Type/subtype_rend.adoc[`subtype_rend`] | Reverse iterator past the first contained (subtype) type. | xref:llvm/Type/subtypes.adoc[`subtypes`] | Return an array view of this type's contained subtypes. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ScalableVectorType/classof.adoc[`classof`] | Methods for support type inquiry through isa, cast, and dyn_cast. | xref:llvm/ScalableVectorType/get-0d.adoc[`get`] | `get` overloads | xref:llvm/Type/getBFloatTy.adoc[`getBFloatTy`] | Return the bfloat (16‐bit) floating‐point type. | xref:llvm/Type/getByte128Ty.adoc[`getByte128Ty`] | Return the 128‐bit byte type. | xref:llvm/Type/getByte16Ty.adoc[`getByte16Ty`] | Return the 16‐bit byte type for the given context. | xref:llvm/Type/getByte1Ty.adoc[`getByte1Ty`] | Return the 1‐bit byte type. | xref:llvm/Type/getByte32Ty.adoc[`getByte32Ty`] | Return the 32‐bit byte type for the given context. | xref:llvm/Type/getByte64Ty.adoc[`getByte64Ty`] | Return the 64‐bit byte type. | xref:llvm/Type/getByte8Ty.adoc[`getByte8Ty`] | Return the 8‐bit byte type. | xref:llvm/Type/getByteFromIntType.adoc[`getByteFromIntType`] | Returns a byte (vector of byte) type with the same size of an integer of the given integer (vector of integer) type. | xref:llvm/Type/getByteNTy.adoc[`getByteNTy`] | Return a byte type with bit width `N.` | xref:llvm/ScalableVectorType/getDoubleElementsVectorType-07.adoc[`getDoubleElementsVectorType`] | `getDoubleElementsVectorType` overloads | xref:llvm/Type/getDoubleTy.adoc[`getDoubleTy`] | Return the IEEE double‐precision (64‐bit) floating‐point type. | xref:llvm/ScalableVectorType/getExtendedElementVectorType-01.adoc[`getExtendedElementVectorType`] | `getExtendedElementVectorType` overloads | xref:llvm/Type/getFP128Ty.adoc[`getFP128Ty`] | Return the 128‐bit IEEE floating‐point type (fp128). | xref:llvm/Type/getFloatTy.adoc[`getFloatTy`] | Return the IEEE single‐precision (32‐bit) floating‐point type. | xref:llvm/Type/getFloatingPointTy.adoc[`getFloatingPointTy`] | Return the floating‐point type matching semantics `S.` | xref:llvm/ScalableVectorType/getHalfElementsVectorType-00.adoc[`getHalfElementsVectorType`] | `getHalfElementsVectorType` overloads | xref:llvm/Type/getHalfTy.adoc[`getHalfTy`] | Return the IEEE half‐precision (16‐bit) floating‐point type. | xref:llvm/Type/getInt128Ty.adoc[`getInt128Ty`] | Return the 128‐bit integer type. | xref:llvm/Type/getInt16Ty.adoc[`getInt16Ty`] | Return the 16‐bit integer type. | xref:llvm/Type/getInt1Ty.adoc[`getInt1Ty`] | Return the 1‐bit integer type. | xref:llvm/Type/getInt32Ty.adoc[`getInt32Ty`] | Return the 32‐bit integer type. | xref:llvm/Type/getInt64Ty.adoc[`getInt64Ty`] | Return the 64‐bit integer type. | xref:llvm/Type/getInt8Ty.adoc[`getInt8Ty`] | Return the 8‐bit integer type. | xref:llvm/Type/getIntFromByteType.adoc[`getIntFromByteType`] | Returns an integer (vector of integer) type with the same size of a byte of the given byte (vector of byte) type. | xref:llvm/Type/getIntNTy.adoc[`getIntNTy`] | Return an integer type with bit width `N.` | xref:llvm/ScalableVectorType/getInteger-0e.adoc[`getInteger`] | `getInteger` overloads | xref:llvm/Type/getLabelTy.adoc[`getLabelTy`] | Return the label type. | xref:llvm/Type/getMetadataTy.adoc[`getMetadataTy`] | Return the metadata type used for metadata operands in the IR. | xref:llvm/VectorType/getOneNthElementsVectorType.adoc[`getOneNthElementsVectorType`] | Return a VectorType with one `Denominator‐th` as many elements as `VTy.` | xref:llvm/Type/getPPC_FP128Ty.adoc[`getPPC_FP128Ty`] | Return the PowerPC double‐double (ppc_fp128) floating‐point type. | xref:llvm/Type/getPrimitiveType.adoc[`getPrimitiveType`] | Return a type based on an identifier. | xref:llvm/Type/getScalarTy.adoc[`getScalarTy`] | Return the LLVM scalar type corresponding to a C++ scalar type `ScalarTy.` | xref:llvm/ScalableVectorType/getSubdividedVectorType-05.adoc[`getSubdividedVectorType`] | `getSubdividedVectorType` overloads | xref:llvm/Type/getTokenTy.adoc[`getTokenTy`] | Return the token type. | xref:llvm/ScalableVectorType/getTruncatedElementVectorType-05.adoc[`getTruncatedElementVectorType`] | `getTruncatedElementVectorType` overloads | xref:llvm/Type/getVoidTy.adoc[`getVoidTy`] | Return the void type. | xref:llvm/Type/getWasm_ExternrefTy.adoc[`getWasm_ExternrefTy`] | Return the WebAssembly externref target‐extension type. | xref:llvm/Type/getWasm_FuncrefTy.adoc[`getWasm_FuncrefTy`] | Return the WebAssembly funcref target‐extension type. | xref:llvm/VectorType/getWithSizeAndScalar.adoc[`getWithSizeAndScalar`] | Construct a vector matching `SizeTy's` bit size with `EltTy's` scalar type. | xref:llvm/Type/getX86_AMXTy.adoc[`getX86_AMXTy`] | Return the X86 AMX type for the given context. | xref:llvm/Type/getX86_FP80Ty.adoc[`getX86_FP80Ty`] | Return the x86 80‐bit extended‐precision floating‐point type. | xref:llvm/VectorType/isValidElementType.adoc[`isValidElementType`] | Return true if the specified type is valid as a element type. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ScalableVectorType/2constructor.adoc[`ScalableVectorType`] [.small]#[constructor]# | Construct a scalable vector with element type `ElTy` and min length `MinNumElts.` | xref:llvm/Type/getSubclassData.adoc[`getSubclassData`] | Return the subclass‐specific data packed into this type. | xref:llvm/Type/setSubclassData.adoc[`setSubclassData`] | Store subclass‐specific data into this type's SubclassData field. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/Type/ContainedTys.adoc[`ContainedTys`] | Pointer to the array of Types contained by this Type. | xref:llvm/VectorType/ElementQuantity.adoc[`ElementQuantity`] | Element quantity of this vector (exact count or vscale minimum). | xref:llvm/Type/NumContainedTys.adoc[`NumContainedTys`] | Keeps track of how many Type*'s there are in the ContainedTys list. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/ComputeLinearIndex-06a.adoc[`ComputeLinearIndex`] | Compute the linearized index of a member in a nested aggregate. | xref:llvm/ComputeLinearIndex-0c.adoc[`ComputeLinearIndex`] | Compute the linearized index of a member in a nested aggregate/struct/array. | xref:llvm/ConstantFoldGetElementPtr.adoc[`ConstantFoldGetElementPtr`] | Attempt to constant fold a getelementptr instruction with the specified operands. | xref:llvm/canVectorizeTy.adoc[`canVectorizeTy`] | Returns true if `Ty` can be used as a vector element or vectorized struct. | xref:llvm/checkGEPType.adoc[`checkGEPType`] | Return `Ty` after asserting it is a valid GEP index result type. | xref:llvm/gep_type_begin-0f.adoc[`gep_type_begin`] | Return a begin iterator over GEP indices from type `Op0` and operands `A.` | xref:llvm/gep_type_end-05.adoc[`gep_type_end`] | Return an end iterator for GEP indices from operands `A.` | xref:llvm/getContainedTypes.adoc[`getContainedTypes`] | Returns the types contained in `Ty`. For struct types, it returns the elements, all other types are returned directly. | xref:llvm/getLLTForType.adoc[`getLLTForType`] | Construct a low‐level type based on an LLVM type. | xref:llvm/getPointersDiff.adoc[`getPointersDiff`] | Returns the distance between compatible pointers `PtrA` and `PtrB.` | xref:llvm/getVectorizedTypeVF.adoc[`getVectorizedTypeVF`] | Returns the number of vector elements for a vectorized type. | xref:llvm/isVectorizedTy.adoc[`isVectorizedTy`] | Returns true if `Ty` is a vector type or a struct of vector types where all vector types share the same VF. | xref:llvm/simplifyGEPInst.adoc[`simplifyGEPInst`] | Given operands for a GetElementPtrInst, fold the result or return null. | xref:llvm/toScalarizedTy.adoc[`toScalarizedTy`] | Convert a vectorized type to its scalarized (non‐vector) form. | xref:llvm/toVectorTy-0d.adoc[`toVectorTy`] | Convert a scalar type to a vector type. | xref:llvm/toVectorTy-0e1.adoc[`toVectorTy`] | Convert a scalar type to a fixed‐length vector type. | xref:llvm/toVectorizedTy.adoc[`toVectorizedTy`] | Convert a scalar or struct type to its vectorized form. | xref:llvm/wrap-0b1.adoc[`wrap`] | C API conversion helpers for `Type` / `LLVMTypeRef,` including typed `unwrap.` | xref:llvm/wrap-0c5.adoc[`wrap`] | Wrap an array of `Type` pointers for the C API. | xref:llvm/AttributeFuncs/isNoFPClassCompatibleType.adoc[`AttributeFuncs::isNoFPClassCompatibleType`] | Returns true if this is a type legal for the 'nofpclass' attribute. This follows the same type rules as FPMathOperator. | xref:llvm/AttributeFuncs/typeIncompatible.adoc[`AttributeFuncs::typeIncompatible`] | Return the mask of attributes incompatible with type `Ty.` | xref:llvm/PatternMatch/m_SpecificType-01.adoc[`PatternMatch::m_SpecificType`] | Match a value of a specific type, capturing it if we match. | xref:llvm/PatternMatch/m_SpecificType-0b0.adoc[`PatternMatch::m_SpecificType`] | Match any value of a specific type. | xref:llvm/PatternMatch/m_SpecificType-0d.adoc[`PatternMatch::m_SpecificType`] | Match a const value of a specific type, capturing it if we match. | xref:llvm/PatternMatch/m_SpecificType-0e.adoc[`PatternMatch::m_SpecificType`] | Match a value of a specific type. | xref:llvm/VNCoercion/analyzeLoadFromClobberingLoad.adoc[`VNCoercion::analyzeLoadFromClobberingLoad`] | This function determines whether a value for the pointer LoadPtr can be extracted from the load at DepLI. | xref:llvm/VNCoercion/analyzeLoadFromClobberingMemInst.adoc[`VNCoercion::analyzeLoadFromClobberingMemInst`] | This function determines whether a value for the pointer LoadPtr can be extracted from the memory intrinsic at DepMI. | xref:llvm/VNCoercion/analyzeLoadFromClobberingStore.adoc[`VNCoercion::analyzeLoadFromClobberingStore`] | This function determines whether a value for the pointer LoadPtr can be extracted from the store at DepSI. | xref:llvm/fuzzerop/makeConstantsWithType-01.adoc[`fuzzerop::makeConstantsWithType`] | Populate a small list of potentially interesting constants of a given type. | xref:llvm/fuzzerop/makeConstantsWithType-09.adoc[`fuzzerop::makeConstantsWithType`] | Return a small list of potentially interesting constants of a given type. | xref:llvm/hlsl/getDXILElementType.adoc[`hlsl::getDXILElementType`] | Converts a scalar or vector LLVM type to its DXIL element type. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#