Enzyme main
Loading...
Searching...
No Matches
mlir::enzyme::SetLattice< ValueT > Class Template Reference

#include "MLIR/Analysis/DataFlowLattice.h"

Inheritance diagram for mlir::enzyme::SetLattice< ValueT >:

Public Types

enum class  State { Undefined , Defined , Unknown }
 

Public Member Functions

 SetLattice ()
 
 SetLattice (ValueT single)
 
DenseSet< ValueT > & getElements ()
 
const DenseSet< ValueT > & getElements () const
 
bool isUnknown () const
 
bool isUndefined () const
 
ChangeResult join (const SetLattice< ValueT > &other)
 
ChangeResult insert (const DenseSet< ValueT > &newElements)
 
ChangeResult markUnknown ()
 
bool isCanonical () const
 Returns true if this set is in the canonical form, i.e.
 
bool operator== (const SetLattice< ValueT > &other) const
 
LLVM_DUMP_METHOD void print (llvm::raw_ostream &os) const
 
ChangeResult foreachElement (function_ref< ChangeResult(ValueT, State)> callback) const
 

Static Public Member Functions

static const SetLattice< ValueT > & getEmpty ()
 Returns an instance of SetLattice known not to have any elements.
 
static const SetLattice< ValueT > & getUndefined ()
 Returns an instance of SetLattice in "undefined" state, i.e.
 
static const SetLattice< ValueT > & getUnknown ()
 Returns an instance of SetLattice for the "unknown" class.
 

Detailed Description

template<typename ValueT>
class mlir::enzyme::SetLattice< ValueT >

Definition at line 49 of file DataFlowLattice.h.

Member Enumeration Documentation

◆ State

template<typename ValueT >
enum class mlir::enzyme::SetLattice::State
strong
Enumerator
Undefined 

Has not been analyzed yet (lattice bottom).

Defined 

Has specific elements.

Unknown 

Analyzed and may contain anything (lattice top).

Definition at line 51 of file DataFlowLattice.h.

Constructor & Destructor Documentation

◆ SetLattice() [1/2]

template<typename ValueT >
mlir::enzyme::SetLattice< ValueT >::SetLattice ( )
inline

Definition at line 57 of file DataFlowLattice.h.

◆ SetLattice() [2/2]

template<typename ValueT >
mlir::enzyme::SetLattice< ValueT >::SetLattice ( ValueT single)
inline

Definition at line 59 of file DataFlowLattice.h.

Member Function Documentation

◆ foreachElement()

◆ getElements() [1/2]

◆ getElements() [2/2]

template<typename ValueT >
const DenseSet< ValueT > & mlir::enzyme::SetLattice< ValueT >::getElements ( ) const
inline

◆ getEmpty()

template<typename ValueT >
static const SetLattice< ValueT > & mlir::enzyme::SetLattice< ValueT >::getEmpty ( )
inlinestatic

Returns an instance of SetLattice known not to have any elements.

This is different from "undefined" and "unknown". The instance is not a classical singleton.

Definition at line 118 of file DataFlowLattice.h.

References mlir::enzyme::SetLattice< ValueT >::Defined.

◆ getUndefined()

template<typename ValueT >
static const SetLattice< ValueT > & mlir::enzyme::SetLattice< ValueT >::getUndefined ( )
inlinestatic

Returns an instance of SetLattice in "undefined" state, i.e.

without a set of elements. This is different from empty set, which indicates that the set is known not to contain any elements. The instance is not a classical singleton, there are other ways of obtaining it.

Definition at line 127 of file DataFlowLattice.h.

Referenced by mlir::enzyme::MapOfSetsLattice< KeyT, ElementT >::lookup().

◆ getUnknown()

template<typename ValueT >
static const SetLattice< ValueT > & mlir::enzyme::SetLattice< ValueT >::getUnknown ( )
inlinestatic

Returns an instance of SetLattice for the "unknown" class.

The instance is not a classical singleton, there are other ways of obtaining an "unknown" alias set.

Definition at line 132 of file DataFlowLattice.h.

◆ insert()

template<typename ValueT >
ChangeResult mlir::enzyme::SetLattice< ValueT >::insert ( const DenseSet< ValueT > & newElements)
inline

◆ isCanonical()

template<typename ValueT >
bool mlir::enzyme::SetLattice< ValueT >::isCanonical ( ) const
inline

Returns true if this set is in the canonical form, i.e.

either the state is State::Defined or the explicit list of classes is empty, but not both.

Definition at line 111 of file DataFlowLattice.h.

References mlir::enzyme::SetLattice< ValueT >::Defined.

Referenced by mlir::enzyme::SetLattice< ValueT >::operator==().

◆ isUndefined()

◆ isUnknown()

◆ join()

◆ markUnknown()

◆ operator==()

template<typename ValueT >
bool mlir::enzyme::SetLattice< ValueT >::operator== ( const SetLattice< ValueT > & other) const
inline

◆ print()

template<typename ValueT >
LLVM_DUMP_METHOD void mlir::enzyme::SetLattice< ValueT >::print ( llvm::raw_ostream & os) const
inline

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