class ConstantDataSequential
Declaration
class ConstantDataSequential : public ConstantData { /* full declaration omitted */ };
Description
ConstantDataSequential - A vector or 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. This is the common base class of ConstantDataArray and ConstantDataVector.
Declared at: llvm/include/llvm/IR/Constants.h:574
Inherits from: ConstantData
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 ConstantDataSequential(const llvm::ConstantDataSequential &)
- protected ConstantDataSequential(llvm::Type * ty, llvm::Value::ValueTy VT, const char * Data)
- public static bool classof(const llvm::Value * V)
- public llvm::StringRef getAsCString() const
- public llvm::StringRef getAsString() const
- public llvm::APFloat getElementAsAPFloat(unsigned int i) const
- public llvm::APInt getElementAsAPInt(unsigned int i) const
- public llvm::Constant * getElementAsConstant(unsigned int i) const
- public double getElementAsDouble(unsigned int i) const
- public float getElementAsFloat(unsigned int i) const
- public uint64_t getElementAsInteger(unsigned int i) const
- public uint64_t getElementByteSize() const
- public llvm::Type * getElementType() const
- protected static llvm::Constant * getImpl(llvm::StringRef Bytes, llvm::Type * Ty)
- public unsigned int getNumElements() const
- public llvm::StringRef getRawDataValues() const
- public inline llvm::SequentialType * getType() const
- public bool isCString() const
- public static bool isElementTypeCompatible(llvm::Type * Ty)
- public bool isString(unsigned int CharSize = 8) const
- protected ~ConstantDataSequential()
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
¶ConstantDataSequential(
const llvm::ConstantDataSequential&)
ConstantDataSequential(
const llvm::ConstantDataSequential&)
Declared at: llvm/include/llvm/IR/Constants.h:598
Parameters
- const llvm::ConstantDataSequential&
¶ConstantDataSequential(llvm::Type* ty,
llvm::Value::ValueTy VT,
const char* Data)
ConstantDataSequential(llvm::Type* ty,
llvm::Value::ValueTy VT,
const char* Data)
Declared at: llvm/include/llvm/IR/Constants.h:591
Parameters
- llvm::Type* ty
- llvm::Value::ValueTy VT
- const char* Data
¶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:675
Parameters
- const llvm::Value* V
¶llvm::StringRef getAsCString() const
llvm::StringRef getAsCString() const
Description
If this array is isCString(), then this method returns the array (without the trailing null byte) as a StringRef. Otherwise, it asserts out.
Declared at: llvm/include/llvm/IR/Constants.h:663
¶llvm::StringRef getAsString() const
llvm::StringRef getAsString() const
Description
If this array is isString(), then this method returns the array as a StringRef. Otherwise, it asserts out.
Declared at: llvm/include/llvm/IR/Constants.h:656
¶llvm::APFloat getElementAsAPFloat(
unsigned int i) const
llvm::APFloat getElementAsAPFloat(
unsigned int i) const
Description
If this is a sequential container of floating point type, return the specified element as an APFloat.
Declared at: llvm/include/llvm/IR/Constants.h:616
Parameters
- unsigned int i
¶llvm::APInt getElementAsAPInt(
unsigned int i) const
llvm::APInt getElementAsAPInt(
unsigned int i) const
Description
If this is a sequential container of integers (of any size), return the specified element as an APInt.
Declared at: llvm/include/llvm/IR/Constants.h:612
Parameters
- unsigned int i
¶llvm::Constant* getElementAsConstant(
unsigned int i) const
llvm::Constant* getElementAsConstant(
unsigned int i) const
Description
Return a Constant for a specified index's element. Note that this has to compute a new constant to return, so it isn't as efficient as getElementAsInteger/Float/Double.
Declared at: llvm/include/llvm/IR/Constants.h:629
Parameters
- unsigned int i
¶double getElementAsDouble(unsigned int i) const
double getElementAsDouble(unsigned int i) const
Description
If this is an sequential container of doubles, return the specified element as a double.
Declared at: llvm/include/llvm/IR/Constants.h:624
Parameters
- unsigned int i
¶float getElementAsFloat(unsigned int i) const
float getElementAsFloat(unsigned int i) const
Description
If this is an sequential container of floats, return the specified element as a float.
Declared at: llvm/include/llvm/IR/Constants.h:620
Parameters
- unsigned int i
¶uint64_t getElementAsInteger(unsigned int i) const
uint64_t getElementAsInteger(unsigned int i) const
Description
If this is a sequential container of integers (of any size), return the specified element in the low bits of a uint64_t.
Declared at: llvm/include/llvm/IR/Constants.h:608
Parameters
- unsigned int i
¶uint64_t getElementByteSize() const
uint64_t getElementByteSize() const
Description
Return the size (in bytes) of each element in the array/vector. The size of the elements is known to be a multiple of one byte.
Declared at: llvm/include/llvm/IR/Constants.h:645
¶llvm::Type* getElementType() const
llvm::Type* getElementType() const
Description
Return the element type of the array/vector.
Declared at: llvm/include/llvm/IR/Constants.h:638
¶static llvm::Constant* getImpl(
llvm::StringRef Bytes,
llvm::Type* Ty)
static llvm::Constant* getImpl(
llvm::StringRef Bytes,
llvm::Type* Ty)
Declared at: llvm/include/llvm/IR/Constants.h:595
Parameters
- llvm::StringRef Bytes
- llvm::Type* Ty
¶unsigned int getNumElements() const
unsigned int getNumElements() const
Description
Return the number of elements in the array or vector.
Declared at: llvm/include/llvm/IR/Constants.h:641
¶llvm::StringRef getRawDataValues() const
llvm::StringRef getRawDataValues() const
Description
Return the raw, underlying, bytes of this data. Note that this is an extremely tricky thing to work with, as it exposes the host endianness of the data elements.
Declared at: llvm/include/llvm/IR/Constants.h:672
¶inline llvm::SequentialType* getType() const
inline llvm::SequentialType* getType() const
Description
Specialize the getType() method to always return a SequentialType, which reduces the amount of casting needed in parts of the compiler.
Declared at: llvm/include/llvm/IR/Constants.h:633
¶bool isCString() const
bool isCString() const
Description
This method returns true if the array "isString", ends with a null byte, and does not contains any other null bytes.
Declared at: llvm/include/llvm/IR/Constants.h:652
¶static bool isElementTypeCompatible(
llvm::Type* Ty)
static bool isElementTypeCompatible(
llvm::Type* Ty)
Description
Return true if a ConstantDataSequential can be formed with a vector or array of the specified element type. ConstantDataArray only works with normal float and int types that are stored densely in memory, not with things like i42 or x86_f80.
Declared at: llvm/include/llvm/IR/Constants.h:604
Parameters
- llvm::Type* Ty
¶bool isString(unsigned int CharSize = 8) const
bool isString(unsigned int CharSize = 8) const
Description
This method returns true if this is an array of \p CharSize integers.
Declared at: llvm/include/llvm/IR/Constants.h:648
Parameters
- unsigned int CharSize = 8
¶~ConstantDataSequential()
~ConstantDataSequential()
Declared at: llvm/include/llvm/IR/Constants.h:593