MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mlir::presburger::PresburgerSet Class Reference

#include "mlir/Analysis/Presburger/PresburgerRelation.h"

+ Inheritance diagram for mlir::presburger::PresburgerSet:

Public Member Functions

 PresburgerSet (const IntegerPolyhedron &disjunct)
 Create a set from a relation. More...
 
 PresburgerSet (const PresburgerRelation &set)
 
PresburgerSet unionSet (const PresburgerRelation &set) const
 These operations are the same as the ones in PresburgeRelation, they just forward the arguement and return the result as a set instead of a relation. More...
 
PresburgerSet intersect (const PresburgerRelation &set) const
 
PresburgerSet complement () const
 
PresburgerSet subtract (const PresburgerRelation &set) const
 
PresburgerSet coalesce () const
 
- Public Member Functions inherited from mlir::presburger::PresburgerRelation
 PresburgerRelation (const IntegerRelation &disjunct)
 
unsigned getNumDomainVars () const
 
unsigned getNumRangeVars () const
 
unsigned getNumSymbolVars () const
 
unsigned getNumLocalVars () const
 
unsigned getNumVars () const
 
unsigned getNumDisjuncts () const
 Return the number of disjuncts in the union. More...
 
const PresburgerSpacegetSpace () const
 
void setSpace (const PresburgerSpace &oSpace)
 Set the space to oSpace. More...
 
void insertVarInPlace (VarKind kind, unsigned pos, unsigned num=1)
 
void convertVarKind (VarKind srcKind, unsigned srcPos, unsigned num, VarKind dstKind, unsigned dstPos)
 Converts variables of the specified kind in the column range [srcPos, srcPos + num) to variables of the specified kind at position dstPos. More...
 
ArrayRef< IntegerRelationgetAllDisjuncts () const
 Return a reference to the list of disjuncts. More...
 
const IntegerRelationgetDisjunct (unsigned index) const
 Return the disjunct at the specified index. More...
 
void unionInPlace (const IntegerRelation &disjunct)
 Mutate this set, turning it into the union of this set and the given disjunct. More...
 
void unionInPlace (const PresburgerRelation &set)
 Mutate this set, turning it into the union of this set and the given set. More...
 
PresburgerRelation unionSet (const PresburgerRelation &set) const
 Return the union of this set and the given set. More...
 
PresburgerRelation intersect (const PresburgerRelation &set) const
 Return the intersection of this set and the given set. More...
 
PresburgerRelation intersectRange (const PresburgerSet &set) const
 Return the range intersection of the given set with this relation. More...
 
PresburgerRelation intersectDomain (const PresburgerSet &set) const
 Return the domain intersection of the given set with this relation. More...
 
PresburgerSet getDomainSet () const
 Return a set corresponding to the domain of the relation. More...
 
PresburgerSet getRangeSet () const
 Return a set corresponding to the range of the relation. More...
 
void inverse ()
 Invert the relation, i.e. More...
 
void compose (const PresburgerRelation &rel)
 Compose this relation with the given relation rel in-place. More...
 
void applyDomain (const PresburgerRelation &rel)
 Apply the domain of given relation rel to this relation. More...
 
void applyRange (const PresburgerRelation &rel)
 Same as compose, provided for uniformity with applyDomain. More...
 
SymbolicLexOpt findSymbolicIntegerLexMin () const
 Compute the symbolic integer lexmin of the relation, i.e. More...
 
SymbolicLexOpt findSymbolicIntegerLexMax () const
 Compute the symbolic integer lexmax of the relation, i.e. More...
 
bool containsPoint (ArrayRef< MPInt > point) const
 Return true if the set contains the given point, and false otherwise. More...
 
bool containsPoint (ArrayRef< int64_t > point) const
 
PresburgerRelation complement () const
 Return the complement of this set. More...
 
PresburgerRelation subtract (const PresburgerRelation &set) const
 Return the set difference of this set and the given set, i.e., return this \ set. More...
 
bool isSubsetOf (const PresburgerRelation &set) const
 Return true if this set is a subset of the given set, and false otherwise. More...
 
bool isEqual (const PresburgerRelation &set) const
 Return true if this set is equal to the given set, and false otherwise. More...
 
bool isIntegerEmpty () const
 Return true if all the sets in the union are known to be integer empty false otherwise. More...
 
bool isObviouslyEmpty () const
 Return true if there is no disjunct, false otherwise. More...
 
bool isObviouslyUniverse () const
 Return true if the set is known to have one unconstrained disjunct, false otherwise. More...
 
bool isObviouslyEqual (const PresburgerRelation &set) const
 Perform a quick equality check on this and other. More...
 
bool isConvexNoLocals () const
 Return true if the set is consist of a single disjunct, without any local variables, false otherwise. More...
 
bool findIntegerSample (SmallVectorImpl< MPInt > &sample)
 Find an integer sample from the given set. More...
 
std::optional< MPIntcomputeVolume () const
 Compute an overapproximation of the number of integer points in the disjunct. More...
 
PresburgerRelation coalesce () const
 Simplifies the representation of a PresburgerRelation. More...
 
bool hasOnlyDivLocals () const
 Check whether all local ids in all disjuncts have a div representation. More...
 
PresburgerRelation computeReprWithOnlyDivLocals () const
 Compute an equivalent representation of the same relation, such that all local ids in all disjuncts have division representations. More...
 
PresburgerRelation simplify () const
 Simplify each disjunct, canonicalizing each disjunct and removing redundencies. More...
 
bool isFullDim () const
 Return whether the given PresburgerRelation is full-dimensional. More...
 
void print (raw_ostream &os) const
 Print the set's internal state. More...
 
void dump () const
 

Static Public Member Functions

static PresburgerSet getUniverse (const PresburgerSpace &space)
 Return a universe set of the specified type that contains all points. More...
 
static PresburgerSet getEmpty (const PresburgerSpace &space)
 Return an empty set of the specified type that contains no points. More...
 
- Static Public Member Functions inherited from mlir::presburger::PresburgerRelation
static PresburgerRelation getUniverse (const PresburgerSpace &space)
 Return a universe set of the specified type that contains all points. More...
 
static PresburgerRelation getEmpty (const PresburgerSpace &space)
 Return an empty set of the specified type that contains no points. More...
 

Protected Member Functions

 PresburgerSet (const PresburgerSpace &space)
 Construct an empty PresburgerRelation with the specified number of dimension and symbols. More...
 
- Protected Member Functions inherited from mlir::presburger::PresburgerRelation
 PresburgerRelation (const PresburgerSpace &space)
 Construct an empty PresburgerRelation with the specified number of dimension and symbols. More...
 

Additional Inherited Members

- Protected Attributes inherited from mlir::presburger::PresburgerRelation
PresburgerSpace space
 
SmallVector< IntegerRelation, 2 > disjuncts
 The list of disjuncts that this set is the union of. More...
 

Detailed Description

Definition at line 244 of file PresburgerRelation.h.

Constructor & Destructor Documentation

◆ PresburgerSet() [1/3]

PresburgerSet::PresburgerSet ( const IntegerPolyhedron disjunct)
explicit

Create a set from a relation.

Definition at line 1070 of file PresburgerRelation.cpp.

Referenced by coalesce(), complement(), getEmpty(), intersect(), subtract(), and unionSet().

◆ PresburgerSet() [2/3]

PresburgerSet::PresburgerSet ( const PresburgerRelation set)
explicit

Definition at line 1073 of file PresburgerRelation.cpp.

◆ PresburgerSet() [3/3]

mlir::presburger::PresburgerSet::PresburgerSet ( const PresburgerSpace space)
inlineexplicitprotected

Member Function Documentation

◆ coalesce()

PresburgerSet PresburgerSet::coalesce ( ) const

◆ complement()

PresburgerSet PresburgerSet::complement ( ) const

◆ getEmpty()

PresburgerSet PresburgerSet::getEmpty ( const PresburgerSpace space)
static

◆ getUniverse()

PresburgerSet PresburgerSet::getUniverse ( const PresburgerSpace space)
static

◆ intersect()

PresburgerSet PresburgerSet::intersect ( const PresburgerRelation set) const

◆ subtract()

PresburgerSet PresburgerSet::subtract ( const PresburgerRelation set) const

◆ unionSet()

PresburgerSet PresburgerSet::unionSet ( const PresburgerRelation set) const

These operations are the same as the ones in PresburgeRelation, they just forward the arguement and return the result as a set instead of a relation.

Definition at line 1076 of file PresburgerRelation.cpp.

References PresburgerSet(), and mlir::presburger::PresburgerRelation::unionSet().

Referenced by mlir::presburger::IntegerRelation::computeReprWithOnlyDivLocals().


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