llvm::sandboxir::ConstantDataSequential

Base class for densely packed array/vector constants of simple data elements.

Synopsis

Declared in <llvm/SandboxIR/Constant.h>

class ConstantDataSequential
    : public Constant

Description

A vector or array constant whose element type is a simple 1/2/4/8-byte integer or half/bfloat/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.

Base Classes

NameDescription
ConstantA SandboxIR wrapper for an LLVM constant value.

Types

NameDescription
UseToUser Helper for mapped_iterator.

Type Aliases

NameDescription
const_op_iterator Const iterator over operand Uses.
const_op_range Const range of operand Use iterators.
const_use_iterator Const iterator over Use edges from this Value's users.
const_user_iterator Const iterator over Users of this Value.
op_iterator Iterator over operand Uses.
op_range Range of operand Use iterators.
use_iterator Iterator over Use edges from this Value's users.
user_iterator Iterator over Users of this Value.

Enums

NameDescription
ClassID Identifies the concrete SandboxIR Value subclass.

Member Functions

NameDescription
dump Dump this Value to dbgs().
dumpCommonFooter Dump the common footer used by Value dumps to OS.
dumpCommonHeader [virtual]Dump the common header for this User to OS.
dumpCommonPrefix Dump the common prefix used by Value dumps to OS.
dumpCommonSuffix Dump the common suffix used by Value dumps to OS.
dumpOS [virtual]Dump this constant to OS.
getAsCString If this array is isCString(), then this method returns the array (without the trailing null byte) as a StringRef. Otherwise, it asserts out.
getAsString If this array is isString(), then this method returns the array as a StringRef. Otherwise, it asserts out.
getContext Return the SandboxIR context that owns this Value.
getElementAsAPFloat If this is a sequential container of floating point type, return element ElmIdx.
getElementAsAPInt If this is a sequential container of integers, return element ElmIdx as APInt.
getElementAsConstant Return a Constant for element ElmIdx.
getElementAsDouble If this is a sequential container of doubles, return element ElmIdx.
getElementAsFloat If this is a sequential container of floats, return element ElmIdx.
getElementAsInteger If this is a sequential container of integers, return element ElmIdx.
getElementByteSize 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.
getElementType Return the element type of the array/vector.
getName Return the LLVM IR name of the bottom-most LLVM value.
getNumElements Return the number of elements in the array or vector.
getNumOperands [virtual]Return the number of operands.
getNumUses Return the number of user edges (not necessarily to unique users).
getOperand Return the value of the operand at OpIdx.
getOperandUse Return the operand use edge for OpIdx.
getParent Return the SandboxIR context that owns this constant.
getRawDataValues Return the raw underlying bytes of this data.
getSubclassID Return the subclass identifier for this Value.
getType Return the SandboxIR type of this Value.
getUid Returns the unique id in the form 'SB<number>.' like 'SB1.'
getUseOperandNo [virtual]Return the operand number corresponding to Use.
hasNUses Return true if this Value has exactly N uses.
hasNUsesOrMore Return true if this value has N uses or more.
isCString This method returns true if the array "isString", ends with a null byte, and does not contains any other null bytes.
isString Return true if this is an array of CharSize integers.
op_begin op_begin overloads
op_end op_end overloads
operands operands overloads
printAsOperandCommon Print this Value as an operand to OS.
replaceAllUsesWith Replace all uses of this Value with Other.
replaceUsesOfWith Replaces any operands that match FromV with ToV. Returns whether any operands were replaced.
replaceUsesWithIf Replace uses of this Value with OtherV when ShouldReplace is true.
setOperand [virtual]Set the operand at OperandIdx to Operand.
use_begin use_begin overloads
use_end use_end overloads
user_begin user_begin overloads
user_end user_end overloads
users users overloads
uses uses overloads
verify [virtual]Verify that this wraps an LLVM Constant.

Static Member Functions

NameDescription
classof For isa/dyn_cast.
isElementTypeCompatible Return true if Ty can be used as a ConstantDataSequential element type.

Protected Member Functions

NameDescription
ConstantDataSequential [constructor]Construct a ConstantDataSequential wrapper around C.
operator= [deleted]Disable copy assignment.
clearValue Clear the underlying LLVM Value pointer.
getOperandUseDefault Return the Use edge that corresponds to OpIdx.
getOperandUseInternal [virtual]Return the Use for operand OpIdx.
getUseOperandNo [virtual]Return the operand index of Use.
getUseOperandNoDefault Return the operand index of Use for single-LLVMIR-instruction Users.
swapOperandsInternal Swap the operands at indices OpIdxA and OpIdxB.
verifyUserOfLLVMUse Verify that Use belongs to this User's underlying LLVM value.

Protected Static Member Functions

NameDescription
getSubclassIDStr Return the string name of subclass identifier ID.

Protected Data Members

NameDescription
Ctx All values point to the context.
SubclassID For isa/dyn_cast.
UID A unique ID used for forming the name (used for debugging).
Val Corresponding LLVM IR Value for this SandboxIR Value.

Derived Classes

NameDescription
ConstantDataArray A densely packed array constant of simple integer or floating-point elements.
ConstantDataVector A densely packed vector constant of simple integer or floating-point elements.