Synopsis

Declared in <llvm/Analysis/DXILResource.h>

class AnyResourceExtType
    : public TargetExtType

Base Classes

Name

Description

TargetExtType

Class to represent target extensions types, which are generally unintrospectable from target‐independent optimizations.

Type Aliases

Enums

Name

Description

Property

TypeID

Definitions of all of the base types for the Type system. Based on this value, you can cast to a class defined in DerivedTypes.h. Note: If you add an element to this, you need to add an element to the Type::getPrimitiveType function, or else things will break! Also update LLVMTypeKind and LLVMGetTypeKind () in the C binding.

Member Functions

Name

Description

AnyResourceExtType [constructor]

Constructors

operator=

Assignment operators

canLosslesslyBitCastTo

Return true if this type could be converted with a lossless BitCast to type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the same size only where no re‐interpretation of the bits is done. Determine if this type could be losslessly bitcast to Ty

containsNonGlobalTargetExtType

Return true if this type is or contains a target extension type that disallows being used as a global.

containsNonLocalTargetExtType

Return true if this type is or contains a target extension type that disallows being used as a local.

dump

getArrayElementType

getArrayNumElements

getByteBitWidth

getContainedType

This method is used to implement the type iterator (defined at the end of the file). For derived types, this returns the types 'contained' in the derived type.

getContext

Return the LLVMContext in which this type was uniqued.

getExtendedType

Given scalar/vector integer type, returns a type with elements twice as wide as in the original type. For vectors, preserves element count.

getFPMantissaWidth

Return the width of the mantissa of this type. This is only valid on floating‐point types. If the FP type does not have a stable mantissa (e.g. ppc long double), this method returns ‐1.

getFltSemantics

getFunctionNumParams

getFunctionParamType

getIntParameter

getIntegerBitWidth

getLayoutType

Returns an underlying layout type for the target extension type. This type can be used to query size and alignment information, if it is appropriate (although note that the layout type may also be void). It is not legal to bitcast between this type and the layout type, however.

getName

Return the name for this target extension type. Two distinct target extension types may have the same name if their type or integer parameters differ.

getNumContainedTypes

Return the number of types in the derived type.

getNumIntParameters

getNumTypeParameters

getPointerAddressSpace

Get the address space of this pointer or pointer vector type.

getPrimitiveSizeInBits

Return the basic size of this type if it is a primitive type. These are fixed by LLVM and are not target‐dependent. This will return zero if the type does not have a size or is not a primitive type.

getResourceType

getScalarSizeInBits

If this is a vector type, return the getPrimitiveSizeInBits value for the element type. Otherwise return the getPrimitiveSizeInBits value for this type.

getScalarType

If this is a vector type, return the element type, otherwise return 'this'.

getStructElementType

getStructName

getStructNumElements

getTargetExtName

getTruncatedType

Given scalar/vector integer type, returns a type with elements half as wide as in the original type. For vectors, preserves element count.

getTypeID

Return the type id for the type. This will return one of the TypeID enum elements defined above.

getTypeParameter

getWithNewBitWidth

Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.

getWithNewType

Given vector type, change the element type, whilst keeping the old number of elements. For non‐vectors simply returns EltTy.

hasProperty

Returns true if the target extension type contains the given property.

int_params

Return the integer parameters for this particular target extension type. If there are no parameters, an empty array is returned.

is16bitFPTy

Return true if this is a 16‐bit float type.

isAggregateType

Return true if the type is an aggregate type. This means it is valid as the first operand of an insertvalue or extractvalue instruction. This includes struct and array types, but does not include vector types.

isArrayTy

True if this is an instance of ArrayType.

isBFloatTy

Return true if this is 'bfloat', a 16‐bit bfloat type.

isByteOrByteVectorTy

isByteOrByteVectorTy overloads

isByteTy

isByteTy overloads

isDoubleTy

Return true if this is 'double', a 64‐bit IEEE fp type.

isEmptyTy

Return true if this type is empty, that is, it has no elements or all of its elements are empty.

isFP128Ty

Return true if this is 'fp128'.

isFPOrFPVectorTy

Return true if this is a FP type or a vector of FP.

isFirstClassType

Return true if the type is "first class", meaning it is a valid type for a Value.

isFloatTy

Return true if this is 'float', a 32‐bit IEEE fp type.

isFloatingPointTy

Return true if this is one of the floating‐point types

isFunctionTy

True if this is an instance of FunctionType.

isFunctionVarArg

isHalfTy

Return true if this is 'half', a 16‐bit IEEE fp type.

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.

isIntOrIntVectorTy

isIntOrIntVectorTy overloads

isIntOrPtrTy

Return true if this is an integer type or a pointer type.

isIntegerTy

isIntegerTy overloads

isLabelTy

Return true if this is 'label'.

isMetadataTy

Return true if this is 'metadata'.

isMultiUnitFPType

Returns true if this is a floating‐point type that is an unevaluated sum of multiple floating‐point units. An example of such a type is ppc_fp128, also known as double‐double, which consists of two IEEE 754 doubles.

isPPC_FP128Ty

Return true if this is powerpc long double.

isPointerTy

True if this is an instance of PointerType.

isPtrOrPtrVectorTy

Return true if this is a pointer type or a vector of pointer types.

isRISCVVectorTupleTy

isScalableTargetExtTy

Return true if this is a target extension type with a scalable layout.

isScalableTy

Return true if this is a type whose size is a known multiple of vscale.

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.

isSized

Return true if it makes sense to take the size of this type. To get the actual size for a particular target, it is reasonable to use the DataLayout subsystem to do this.

isStructTy

True if this is an instance of StructType.

isTargetExtTy

Return true if this is a target extension type.

isTokenLikeTy

Returns true if this is 'token' or a token‐like target type.s

isTokenTy

Return true if this is 'token'.

isVectorTy

True if this is an instance of VectorType.

isVoidTy

Return true if this is 'void'.

isX86_AMXTy

Return true if this is X86 AMX.

isX86_FP80Ty

Return true if this is x86 long double.

print

Print the current type. Omit the type details if NoDetails == true. E.g., let %st = type { i32, i16 } When NoDetails is true, we only print %st. Put differently, NoDetails prints the type as if inlined with the operands when printing an instruction.

subtype_begin

subtype_end

subtype_rbegin

subtype_rend

subtypes

type_param_begin

type_param_end

type_params

Return the type parameters for this particular target extension type. If there are no parameters, an empty array is returned.

Static Member Functions

Name

Description

checkParams

Check that a newly created target extension type has the expected number of type parameters and integer parameters, returning the type itself if OK or an appropriate Error if not.

classof

get

Return a target extension type having the specified name and optional type and integer parameters.

getBFloatTy

getByte128Ty

getByte16Ty

getByte1Ty

getByte32Ty

getByte64Ty

getByte8Ty

getByteFromIntType

Returns a byte (vector of byte) type with the same size of an integer of the given integer (vector of integer) type.

getByteNTy

getDoubleTy

getFP128Ty

getFloatTy

getFloatingPointTy

getHalfTy

getInt128Ty

getInt16Ty

getInt1Ty

getInt32Ty

getInt64Ty

getInt8Ty

getIntFromByteType

Returns an integer (vector of integer) type with the same size of a byte of the given byte (vector of byte) type.

getIntNTy

getLabelTy

getMetadataTy

getOrError

Return a target extension type having the specified name and optional type and integer parameters, or an appropriate Error if it fails the parameters check.

getPPC_FP128Ty

getPrimitiveType

Return a type based on an identifier.

getScalarTy

getTokenTy

getVoidTy

getWasm_ExternrefTy

getWasm_FuncrefTy

getX86_AMXTy

getX86_FP80Ty

Protected Member Functions

Protected Data Members

Name

Description

ContainedTys

A pointer to the array of Types contained by this Type. For example, this includes the arguments of a function type, the elements of a structure, the pointee of a pointer, the element type of an array, etc. This pointer may be 0 for types that don't contain other types (Integer, Double, Float).

NumContainedTys

Keeps track of how many Type*'s there are in the ContainedTys list.

Non-Member Functions

Name

Description

::llvm::ComputeLinearIndex

Compute the linearized index of a member in a nested aggregate/struct/array.

::llvm::canVectorizeTy

Returns true if Ty is a valid vector element type, void, or an unpacked literal struct where all elements are valid vector element types. Note: Even if a type can be vectorized that does not mean it is valid to do so in all cases. For example, a vectorized struct (as returned by toVectorizedTy) does not perform (de)interleaving, so it can't be used for vectorizing loads/stores.

::llvm::getContainedTypes

Returns the types contained in Ty. For struct types, it returns the elements, all other types are returned directly.

::llvm::getLLTForType

Construct a low‐level type based on an LLVM type.

::llvm::getPointersDiff

Returns the distance between the pointers PtrA and PtrB iff they are compatible and it is possible to calculate the distance between them. This is a simple API that does not depend on the analysis pass.

::llvm::getVectorizedTypeVF

Returns the number of vector elements for a vectorized type.

::llvm::isVectorizedTy

Returns true if Ty is a vector type or a struct of vector types where all vector types share the same VF.

::llvm::simplifyGEPInst

Given operands for a GetElementPtrInst, fold the result or return null.

::llvm::toScalarizedTy

A helper for converting vectorized types to scalarized (non‐vector) types. For vector types, this is equivalent to calling .getScalarType(). For struct types, this returns a new struct where each element type has been converted to a scalar type. Note: Only unpacked literal struct types are supported.

::llvm::toVectorTy

A helper function for converting Scalar types to vector types. If the incoming type is void, we return void. If the EC represents a scalar, we return the scalar type.

::llvm::toVectorizedTy

A helper for converting to vectorized types. For scalar types, this is equivalent to calling toVectorTy. For struct types, this returns a new struct where each element type has been widened to a vector type. Note: ‐ If the incoming type is void, we return void ‐ If EC is scalar, Ty is returned unchanged ‐ Only unpacked literal struct types are supported

::llvm::AttributeFuncs::isNoFPClassCompatibleType

Returns true if this is a type legal for the 'nofpclass' attribute. This follows the same type rules as FPMathOperator.

::llvm::AttributeFuncs::typeIncompatible

Which attributes cannot be applied to a type. The argument AS is used as a hint for the attributes whose compatibility is being checked against Ty. This does not mean the return will be a subset of AS, just that attributes that have specific dynamic type compatibilities (i.e range) will be checked against what is contained in AS. The argument ASK indicates, if only attributes that are known to be safely droppable are contained in the mask; only attributes that might be unsafe to drop (e.g., ABI‐related attributes) are in the mask; or both.

::llvm::PatternMatch::m_SpecificType

Match a value of a specific type, capturing it if we match.

::llvm::PatternMatch::m_SpecificType

Match a value of a specific type.

::llvm::VNCoercion::analyzeLoadFromClobberingLoad

This function determines whether a value for the pointer LoadPtr can be extracted from the load at DepLI.

::llvm::VNCoercion::analyzeLoadFromClobberingMemInst

This function determines whether a value for the pointer LoadPtr can be extracted from the memory intrinsic at DepMI.

::llvm::VNCoercion::analyzeLoadFromClobberingStore

This function determines whether a value for the pointer LoadPtr can be extracted from the store at DepSI.

::llvm::fuzzerop::makeConstantsWithType

@{ Populate a small list of potentially interesting constants of a given type.

::llvm::hlsl::getDXILElementType

Converts a scalar or vector LLVM type to its DXIL element type. Integer signedness must be supplied separately because LLVM integer types are signless.

Created with MrDocs