An floating‐point‐like constant.
Synopsis
Declared in <llvm/CodeGen/GlobalISel/Utils.h>
class GFConstant;
Description
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.
Enums
Name |
Description |
Shape of the floating‐point‐like constant. |
Member Functions
Name |
Description |
|
Constructors |
Iterator to the first element of a scalar or fixed‐vector constant. |
|
Iterator past the last element of a scalar or fixed‐vector constant. |
|
Returns the kind of of this constant, e.g, Scalar. |
|
Returns the value, if this constant is a scalar. |
|
Number of elements in a fixed‐vector constant. |
Static Member Functions
Name |
Description |
Build a GFConstant from a register if it is a known float constant. |
Created with MrDocs