MLIR  17.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...
 
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...
 
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 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...
 
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 161 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 843 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 846 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

Return an empty set of the specified type that contains no points.

Definition at line 839 of file PresburgerRelation.cpp.

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

Referenced by mlir::presburger::PWMAFunction::getDomain(), and mlir::presburger::MultiAffineFunction::getLexSet().

◆ getUniverse()

PresburgerSet PresburgerSet::getUniverse ( const PresburgerSpace space)
static

Return a universe set of the specified type that contains all points.

Definition at line 833 of file PresburgerRelation.cpp.

References mlir::presburger::IntegerPolyhedron::getUniverse(), mlir::presburger::PresburgerRelation::space, and mlir::presburger::PresburgerRelation::unionInPlace().

◆ 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 849 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: