LLVM: llvm::GFConstant Class Reference (original) (raw)

An floating-point-like constant. More...

#include "[llvm/CodeGen/GlobalISel/Utils.h](CodeGen%5F2GlobalISel%5F2Utils%5F8h%5Fsource.html)"

Public Types
enum class GFConstantKind { Scalar, FixedVector, ScalableVector }
Public Member Functions
GFConstant (ArrayRef< APFloat > Values)
GFConstant (const APFloat &Value, GFConstantKind Kind)
GFConstantKind getKind () const
Returns the kind of of this constant, e.g, Scalar.
const_iterator begin () const
const_iterator end () const
size_t size () const
LLVM_ABI APFloat getScalarValue () const
Returns the value, if this constant is a scalar.

Detailed Description

An floating-point-like constant.

It abstracts over scalar, fixed-length vectors, and scalable vectors. In the common case, it provides a common API and feels like an APFloat, while still providing low-level access. It can be used for constant-folding.

bool isZero() abstracts over the kind.

switch(const.getKind()) { } provides low-level access.

Definition at line 688 of file Utils.h.

Member Enumeration Documentation

GFConstantKind

Enumerator
Scalar
FixedVector
ScalableVector

Definition at line 693 of file Utils.h.

Constructor & Destructor Documentation

GFConstant() [2/2]

Member Function Documentation

begin()

const_iterator llvm::GFConstant::begin ( ) const inline

end()

const_iterator llvm::GFConstant::end ( ) const inline

getConstant()

getKind()

GFConstantKind llvm::GFConstant::getKind ( ) const inline

Returns the kind of of this constant, e.g, Scalar.

Definition at line 707 of file Utils.h.

getScalarValue()

APFloat llvm::GFConstant::getScalarValue ( ) const

size()

size_t llvm::GFConstant::size ( ) const inline

The documentation for this class was generated from the following files: