LLZK 0.1.0
Veridise's ZK Language IR
|
A lattice for use in dense analysis. More...
#include <ConstrainRefLattice.h>
Public Types | |
using | ValueTy = llvm::PointerUnion<mlir::Value, mlir::Operation *> |
using | ValueMap = mlir::DenseMap<ValueTy, ConstrainRefLatticeValue> |
using | ValueSet = mlir::DenseSet<ValueTy> |
using | Ref2Val = mlir::DenseMap<ConstrainRef, mlir::DenseSet<ValueTy>> |
Public Member Functions | |
mlir::ChangeResult | join (const AbstractDenseLattice &rhs) override |
Maximum upper bound. | |
virtual mlir::ChangeResult | meet (const AbstractDenseLattice &rhs) override |
Minimum lower bound. | |
void | print (mlir::raw_ostream &os) const override |
mlir::ChangeResult | setValues (const ValueMap &rhs) |
mlir::ChangeResult | setValue (ValueTy v, const ConstrainRefLatticeValue &rhs) |
mlir::ChangeResult | setValue (ValueTy v, const ConstrainRef &ref) |
ConstrainRefLatticeValue | getOrDefault (ValueTy v) const |
ConstrainRefLatticeValue | getReturnValue (unsigned i) const |
ValueSet | lookupValues (const ConstrainRef &r) const |
size_t | size () const |
const ValueMap & | getMap () const |
const Ref2Val & | getRef2Val () const |
ValueMap::iterator | begin () |
ValueMap::iterator | end () |
ValueMap::const_iterator | begin () const |
ValueMap::const_iterator | end () const |
Static Public Member Functions | |
static mlir::FailureOr< ConstrainRef > | getSourceRef (mlir::Value val) |
If val is the source of other values (i.e., a block argument from the function args or a constant), create the base reference to the val. | |
Friends | |
mlir::raw_ostream & | operator<< (mlir::raw_ostream &os, const ConstrainRefLattice &v) |
A lattice for use in dense analysis.
Definition at line 90 of file ConstrainRefLattice.h.
using llzk::ConstrainRefLattice::Ref2Val = mlir::DenseMap<ConstrainRef, mlir::DenseSet<ValueTy>> |
Definition at line 99 of file ConstrainRefLattice.h.
using llzk::ConstrainRefLattice::ValueMap = mlir::DenseMap<ValueTy, ConstrainRefLatticeValue> |
Definition at line 95 of file ConstrainRefLattice.h.
using llzk::ConstrainRefLattice::ValueSet = mlir::DenseSet<ValueTy> |
Definition at line 98 of file ConstrainRefLattice.h.
using llzk::ConstrainRefLattice::ValueTy = llvm::PointerUnion<mlir::Value, mlir::Operation *> |
Definition at line 94 of file ConstrainRefLattice.h.
|
inline |
Definition at line 149 of file ConstrainRefLattice.h.
|
inline |
Definition at line 151 of file ConstrainRefLattice.h.
|
inline |
Definition at line 150 of file ConstrainRefLattice.h.
|
inline |
Definition at line 152 of file ConstrainRefLattice.h.
|
inline |
Definition at line 145 of file ConstrainRefLattice.h.
ConstrainRefLatticeValue llzk::ConstrainRefLattice::getOrDefault | ( | ConstrainRefLattice::ValueTy | v | ) | const |
Definition at line 255 of file ConstrainRefLattice.cpp.
|
inline |
Definition at line 147 of file ConstrainRefLattice.h.
ConstrainRefLatticeValue llzk::ConstrainRefLattice::getReturnValue | ( | unsigned | i | ) | const |
Definition at line 270 of file ConstrainRefLattice.cpp.
|
static |
If val is the source of other values (i.e., a block argument from the function args or a constant), create the base reference to the val.
Otherwise, return failure. Our lattice values must originate from somewhere.
Definition at line 194 of file ConstrainRefLattice.cpp.
|
inlineoverride |
Maximum upper bound.
Definition at line 113 of file ConstrainRefLattice.h.
ConstrainRefLattice::ValueSet llzk::ConstrainRefLattice::lookupValues | ( | const ConstrainRef & | r | ) | const |
Definition at line 281 of file ConstrainRefLattice.cpp.
|
inlineoverridevirtual |
Minimum lower bound.
Definition at line 122 of file ConstrainRefLattice.h.
|
override |
Definition at line 211 of file ConstrainRefLattice.cpp.
mlir::ChangeResult llzk::ConstrainRefLattice::setValue | ( | ValueTy | v, |
const ConstrainRef & | ref ) |
Definition at line 250 of file ConstrainRefLattice.cpp.
mlir::ChangeResult llzk::ConstrainRefLattice::setValue | ( | ValueTy | v, |
const ConstrainRefLatticeValue & | rhs ) |
Definition at line 243 of file ConstrainRefLattice.cpp.
mlir::ChangeResult llzk::ConstrainRefLattice::setValues | ( | const ValueMap & | rhs | ) |
Definition at line 234 of file ConstrainRefLattice.cpp.
|
inline |
Definition at line 143 of file ConstrainRefLattice.h.
|
friend |