class ConstantDataArray
Declaration
class ConstantDataArray : public ConstantDataSequential { /* full declaration omitted */ };
Description
An array constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. ConstantInt/ConstantFP). This Constant node has no operands because it stores all of the elements of the constant as densely packed data, instead of as Value*'s.
Declared at: llvm/include/llvm/IR/Constants.h:690
Inherits from: ConstantDataSequential
Member Variables
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 29
- public static MaximumAlignment = 1U << MaxAlignmentExponent
Method Overview
- public ConstantDataArray(const llvm::ConstantDataArray &)
- public static bool classof(const llvm::Value * V)
- public template <typename ElementTy>static llvm::Constant * get(llvm::LLVMContext & Context, ArrayRef<ElementTy> Elts)
- public template <typename ArrayTy>static llvm::Constant * get(llvm::LLVMContext & Context, ArrayTy & Elts)
- public static llvm::Constant * getFP(llvm::LLVMContext & Context, ArrayRef<uint16_t> Elts)
- public static llvm::Constant * getFP(llvm::LLVMContext & Context, ArrayRef<uint32_t> Elts)
- public static llvm::Constant * getFP(llvm::LLVMContext & Context, ArrayRef<uint64_t> Elts)
- public static llvm::Constant * getRaw(llvm::StringRef Data, uint64_t NumElements, llvm::Type * ElementTy)
- public static llvm::Constant * getString(llvm::LLVMContext & Context, llvm::StringRef Initializer, bool AddNull = true)
- public inline llvm::ArrayType * getType() const
Inherited from ConstantDataSequential:
- public classof
- public getAsCString
- public getAsString
- public getElementAsAPFloat
- public getElementAsAPInt
- public getElementAsConstant
- public getElementAsDouble
- public getElementAsFloat
- public getElementAsInteger
- public getElementByteSize
- public getElementType
- protected getImpl
- public getNumElements
- public getRawDataValues
- public getType
- public isCString
- public isElementTypeCompatible
- public isString
Inherited from ConstantData:
Inherited from Constant:
- public canTrap
- public classof
- public containsConstantExpression
- public containsUndefElement
- public destroyConstant
- public getAggregateElement
- public getAggregateElement
- public getAllOnesValue
- public getIntegerValue
- public getNullValue
- public getSplatValue
- public getUniqueInteger
- public handleOperandChange
- public hasExactInverseFP
- public isAllOnesValue
- public isConstantUsed
- public isDLLImportDependent
- public isElementWiseEqual
- public isFiniteNonZeroFP
- public isMinSignedValue
- public isNaN
- public isNegativeZeroValue
- public isNormalFP
- public isNotMinSignedValue
- public isNotOneValue
- public isNullValue
- public isOneValue
- public isThreadDependent
- public isZeroValue
- public needsRelocation
- public removeDeadConstantUsers
- public replaceUndefsWith
- public stripPointerCasts
- public stripPointerCasts
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public clearSubclassOptionalData
- public deleteValue
- public dump
- public getContext
- public getName
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- protected getSubclassDataFromValue
- public getType
- public getValueID
- public getValueName
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsAndInvariantGroups
- public stripPointerCastsAndInvariantGroups
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶ConstantDataArray(const llvm::ConstantDataArray&)
ConstantDataArray(const llvm::ConstantDataArray&)
Declared at: llvm/include/llvm/IR/Constants.h:697
Parameters
- const llvm::ConstantDataArray&
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Description
Methods for support type inquiry through isa, cast, and dyn_cast:
Declared at: llvm/include/llvm/IR/Constants.h:751
Parameters
- const llvm::Value* V
¶template <typename ElementTy>
static llvm::Constant* get(
llvm::LLVMContext& Context,
ArrayRef<ElementTy> Elts)
template <typename ElementTy>
static llvm::Constant* get(
llvm::LLVMContext& Context,
ArrayRef<ElementTy> Elts)
Description
get() constructor - Return a constant with array type with an element count and element type matching the ArrayRef passed in. Note that this can return a ConstantAggregateZero object.
Declared at: llvm/include/llvm/IR/Constants.h:703
Templates
- ElementTy
Parameters
- llvm::LLVMContext& Context
- ArrayRef<ElementTy> Elts
¶template <typename ArrayTy>
static llvm::Constant* get(
llvm::LLVMContext& Context,
ArrayTy& Elts)
template <typename ArrayTy>
static llvm::Constant* get(
llvm::LLVMContext& Context,
ArrayTy& Elts)
Description
get() constructor - ArrayTy needs to be compatible with ArrayRef <ElementTy >. Calls get(LLVMContext, ArrayRef <ElementTy >).
Declared at: llvm/include/llvm/IR/Constants.h:712
Templates
- ArrayTy
Parameters
- llvm::LLVMContext& Context
- ArrayTy& Elts
¶static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint16_t> Elts)
static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint16_t> Elts)
Description
getFP() constructors - Return a constant with array type with an element count and element type of float with precision matching the number of bits in the ArrayRef passed in. (i.e. half for 16bits, float for 32bits, double for 64bits) Note that this can return a ConstantAggregateZero object.
Declared at: llvm/include/llvm/IR/Constants.h:732
Parameters
- llvm::LLVMContext& Context
- ArrayRef<uint16_t> Elts
¶static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint32_t> Elts)
static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint32_t> Elts)
Declared at: llvm/include/llvm/IR/Constants.h:733
Parameters
- llvm::LLVMContext& Context
- ArrayRef<uint32_t> Elts
¶static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint64_t> Elts)
static llvm::Constant* getFP(
llvm::LLVMContext& Context,
ArrayRef<uint64_t> Elts)
Declared at: llvm/include/llvm/IR/Constants.h:734
Parameters
- llvm::LLVMContext& Context
- ArrayRef<uint64_t> Elts
¶static llvm::Constant* getRaw(
llvm::StringRef Data,
uint64_t NumElements,
llvm::Type* ElementTy)
static llvm::Constant* getRaw(
llvm::StringRef Data,
uint64_t NumElements,
llvm::Type* ElementTy)
Description
get() constructor - Return a constant with array type with an element count and element type matching the NumElements and ElementTy parameters passed in. Note that this can return a ConstantAggregateZero object. ElementTy needs to be one of i8/i16/i32/i64/float/double. Data is the buffer containing the elements. Be careful to make sure Data uses the right endianness, the buffer will be used as-is.
Declared at: llvm/include/llvm/IR/Constants.h:722
Parameters
- llvm::StringRef Data
- uint64_t NumElements
- llvm::Type* ElementTy
¶static llvm::Constant* getString(
llvm::LLVMContext& Context,
llvm::StringRef Initializer,
bool AddNull = true)
static llvm::Constant* getString(
llvm::LLVMContext& Context,
llvm::StringRef Initializer,
bool AddNull = true)
Description
This method constructs a CDS and initializes it with a text string. The default behavior (AddNull==true) causes a null terminator to be placed at the end of the array (increasing the length of the string by one more than the StringRef would normally indicate. Pass AddNull=false to disable this behavior.
Declared at: llvm/include/llvm/IR/Constants.h:741
Parameters
- llvm::LLVMContext& Context
- llvm::StringRef Initializer
- bool AddNull = true
¶inline llvm::ArrayType* getType() const
inline llvm::ArrayType* getType() const
Description
Specialize the getType() method to always return an ArrayType, which reduces the amount of casting needed in parts of the compiler.
Declared at: llvm/include/llvm/IR/Constants.h:746