LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::ConstrainRefLattice Class Reference

A lattice for use in dense analysis. More...

#include <ConstrainRefLattice.h>

Inheritance diagram for llzk::ConstrainRefLattice:
[legend]
Collaboration diagram for llzk::ConstrainRefLattice:
[legend]

Public Types

using ValueMap = mlir::DenseMap<mlir::Value, ConstrainRefLatticeValue>
 

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 (mlir::Value v, const ConstrainRefLatticeValue &rhs)
 
mlir::ChangeResult setValue (mlir::Value v, const ConstrainRef &ref)
 
ConstrainRefLatticeValue getOrDefault (mlir::Value v) const
 
ConstrainRefLatticeValue getReturnValue (unsigned i) const
 
size_t size () const
 
const ValueMapgetMap () const
 
ValueMap::iterator begin ()
 
ValueMap::iterator end ()
 
ValueMap::const_iterator begin () const
 
ValueMap::const_iterator end () const
 

Static Public Member Functions

static mlir::FailureOr< ConstrainRefgetSourceRef (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)
 

Detailed Description

A lattice for use in dense analysis.

Definition at line 87 of file ConstrainRefLattice.h.

Member Typedef Documentation

◆ ValueMap

using llzk::ConstrainRefLattice::ValueMap = mlir::DenseMap<mlir::Value, ConstrainRefLatticeValue>

Definition at line 89 of file ConstrainRefLattice.h.

Member Function Documentation

◆ begin() [1/2]

ValueMap::iterator llzk::ConstrainRefLattice::begin ( )
inline

Definition at line 139 of file ConstrainRefLattice.h.

◆ begin() [2/2]

ValueMap::const_iterator llzk::ConstrainRefLattice::begin ( ) const
inline

Definition at line 141 of file ConstrainRefLattice.h.

◆ end() [1/2]

ValueMap::iterator llzk::ConstrainRefLattice::end ( )
inline

Definition at line 140 of file ConstrainRefLattice.h.

◆ end() [2/2]

ValueMap::const_iterator llzk::ConstrainRefLattice::end ( ) const
inline

Definition at line 142 of file ConstrainRefLattice.h.

◆ getMap()

const ValueMap & llzk::ConstrainRefLattice::getMap ( ) const
inline

Definition at line 137 of file ConstrainRefLattice.h.

◆ getOrDefault()

ConstrainRefLatticeValue llzk::ConstrainRefLattice::getOrDefault ( mlir::Value v) const

Definition at line 213 of file ConstrainRefLattice.cpp.

◆ getReturnValue()

ConstrainRefLatticeValue llzk::ConstrainRefLattice::getReturnValue ( unsigned i) const

Definition at line 225 of file ConstrainRefLattice.cpp.

◆ getSourceRef()

mlir::FailureOr< ConstrainRef > llzk::ConstrainRefLattice::getSourceRef ( mlir::Value val)
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 174 of file ConstrainRefLattice.cpp.

◆ join()

mlir::ChangeResult llzk::ConstrainRefLattice::join ( const AbstractDenseLattice & rhs)
inlineoverride

Maximum upper bound.

Definition at line 103 of file ConstrainRefLattice.h.

◆ meet()

virtual mlir::ChangeResult llzk::ConstrainRefLattice::meet ( const AbstractDenseLattice & rhs)
inlineoverridevirtual

Minimum lower bound.

Definition at line 112 of file ConstrainRefLattice.h.

◆ print()

void llzk::ConstrainRefLattice::print ( mlir::raw_ostream & os) const
override

Definition at line 189 of file ConstrainRefLattice.cpp.

◆ setValue() [1/2]

mlir::ChangeResult llzk::ConstrainRefLattice::setValue ( mlir::Value v,
const ConstrainRef & ref )
inline

Definition at line 127 of file ConstrainRefLattice.h.

◆ setValue() [2/2]

mlir::ChangeResult llzk::ConstrainRefLattice::setValue ( mlir::Value v,
const ConstrainRefLatticeValue & rhs )
inline

Definition at line 123 of file ConstrainRefLattice.h.

◆ setValues()

mlir::ChangeResult llzk::ConstrainRefLattice::setValues ( const ValueMap & rhs)

Definition at line 204 of file ConstrainRefLattice.cpp.

◆ size()

size_t llzk::ConstrainRefLattice::size ( ) const
inline

Definition at line 135 of file ConstrainRefLattice.h.

Friends And Related Symbol Documentation

◆ operator<<

mlir::raw_ostream & operator<< ( mlir::raw_ostream & os,
const ConstrainRefLattice & v )
friend

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