llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <passes/sccp/lattice.h>
Public Types | |
enum | Kind { Kind::UNKNOWN, Kind::OVERDEFINED, Kind::INT, Kind::MASK, Kind::FLOAT, Kind::FLOAT_ZERO, Kind::FRAME, Kind::GLOBAL, Kind::POINTER, Kind::RANGE, Kind::UNDEFINED } |
Enumeration of lattice value kinds. More... | |
Public Member Functions | |
Lattice (const Lattice &that) | |
Kind | GetKind () const |
bool | IsUnknown () const |
bool | IsOverdefined () const |
bool | IsUndefined () const |
bool | IsInt () const |
bool | IsMask () const |
bool | IsFloat () const |
bool | IsFloatZero () const |
bool | IsGlobal () const |
bool | IsFrame () const |
bool | IsPointer () const |
bool | IsRange () const |
bool | IsPointerLike () const |
APInt | GetInt () const |
APInt | GetKnown () const |
APInt | GetValue () const |
APFloat | GetFloat () const |
unsigned | GetFrameObject () const |
int64_t | GetFrameOffset () const |
Global * | GetGlobalSymbol () const |
int64_t | GetGlobalOffset () const |
Global * | GetRange () const |
bool | IsTrue () const |
bool | IsFalse () const |
std::optional< APInt > | AsInt () const |
Returns some integer, if the value is one. | |
std::optional< APFloat > | AsFloat () const |
Returns some float, if the value is one. | |
bool | operator!= (const Lattice &that) const |
Checks if two values are not identical. | |
bool | operator== (const Lattice &that) const |
Checks if two values are identical. | |
Lattice & | operator= (const Lattice &that) |
Assigns a value to a lattice. | |
Lattice | LUB (const Lattice &that) const |
Least upper bound operator. | |
Static Public Member Functions | |
static Lattice | Unknown () |
Creates an unknown value. | |
static Lattice | Overdefined () |
Creates an overdefined value. | |
static Lattice | Undefined () |
Creates an undefined value. | |
static Lattice | Pointer () |
Creates a unknown pointer value. | |
static Lattice | CreateFrame (unsigned obj, int64_t off) |
Creates a frame value. | |
static Lattice | CreateGlobal (Global *g, int64_t Off=0) |
Creates a global value. | |
static Lattice | CreateRange (Global *g) |
Creates a global value. | |
static Lattice | CreateInteger (int64_t i) |
Creates an integral value from an integer. | |
static Lattice | CreateInteger (const APInt &i) |
Creates an integral value. | |
static Lattice | CreateMask (const APInt &known, const APInt &values) |
Creates a mask value;. | |
static Lattice | CreateFloat (double f) |
Creates a floating value from a double. | |
static Lattice | CreateFloat (const APFloat &f) |
Creates a floating value. | |
static Lattice | CreateFloatZero () |
Creates a float-point zero. | |
Lattice for SCCP values.
|
strong |
Enumeration of lattice value kinds.
Enumerator | |
---|---|
UNKNOWN | Top - value not encountered yet. |
OVERDEFINED | Bot - value is not constant. |
INT | Constant integer. |
MASK | Integral bit mask. |
FLOAT | Constant floating-point. |
FLOAT_ZERO | Positive or negative float zero. |
FRAME | Offset into the frame. |
GLOBAL | Constant symbol with a potential offset. |
POINTER | Pointer which is not null. |
RANGE | Any offset into a pointer. |
UNDEFINED | Constant, undefined. |