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 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 ValueMapgetMap () const
 
const Ref2ValgetRef2Val () 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 90 of file ConstrainRefLattice.h.

Member Typedef Documentation

◆ Ref2Val

using llzk::ConstrainRefLattice::Ref2Val = mlir::DenseMap<ConstrainRef, mlir::DenseSet<ValueTy>>

Definition at line 99 of file ConstrainRefLattice.h.

◆ ValueMap

◆ ValueSet

Definition at line 98 of file ConstrainRefLattice.h.

◆ ValueTy

using llzk::ConstrainRefLattice::ValueTy = llvm::PointerUnion<mlir::Value, mlir::Operation *>

Definition at line 94 of file ConstrainRefLattice.h.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 149 of file ConstrainRefLattice.h.

◆ begin() [2/2]

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

Definition at line 151 of file ConstrainRefLattice.h.

◆ end() [1/2]

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

Definition at line 150 of file ConstrainRefLattice.h.

◆ end() [2/2]

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

Definition at line 152 of file ConstrainRefLattice.h.

◆ getMap()

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

Definition at line 145 of file ConstrainRefLattice.h.

◆ getOrDefault()

ConstrainRefLatticeValue llzk::ConstrainRefLattice::getOrDefault ( ConstrainRefLattice::ValueTy v) const

Definition at line 255 of file ConstrainRefLattice.cpp.

◆ getRef2Val()

const Ref2Val & llzk::ConstrainRefLattice::getRef2Val ( ) const
inline

Definition at line 147 of file ConstrainRefLattice.h.

◆ getReturnValue()

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

Definition at line 270 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 194 of file ConstrainRefLattice.cpp.

◆ join()

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

Maximum upper bound.

Definition at line 113 of file ConstrainRefLattice.h.

◆ lookupValues()

ConstrainRefLattice::ValueSet llzk::ConstrainRefLattice::lookupValues ( const ConstrainRef & r) const

Definition at line 281 of file ConstrainRefLattice.cpp.

◆ meet()

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

Minimum lower bound.

Definition at line 122 of file ConstrainRefLattice.h.

◆ print()

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

Definition at line 211 of file ConstrainRefLattice.cpp.

◆ setValue() [1/2]

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

Definition at line 250 of file ConstrainRefLattice.cpp.

◆ setValue() [2/2]

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

Definition at line 243 of file ConstrainRefLattice.cpp.

◆ setValues()

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

Definition at line 234 of file ConstrainRefLattice.cpp.

◆ size()

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

Definition at line 143 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: