MLIR
20.0.0git
|
#include "mlir/Analysis/Presburger/PresburgerRelation.h"
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 PresburgerSpace & | getSpace () 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< IntegerRelation > | getAllDisjuncts () const |
Return a reference to the list of disjuncts. More... | |
const IntegerRelation & | getDisjunct (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< DynamicAPInt > 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< DynamicAPInt > &sample) |
Find an integer sample from the given set. More... | |
std::optional< DynamicAPInt > | computeVolume () 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... | |
Definition at line 244 of file PresburgerRelation.h.
|
explicit |
Create a set from a relation.
Definition at line 1072 of file PresburgerRelation.cpp.
Referenced by coalesce(), complement(), getEmpty(), intersect(), subtract(), and unionSet().
|
explicit |
Definition at line 1075 of file PresburgerRelation.cpp.
|
inlineexplicitprotected |
Construct an empty PresburgerRelation with the specified number of dimension and symbols.
Definition at line 268 of file PresburgerRelation.h.
References mlir::presburger::PresburgerSpace::getNumDomainVars(), mlir::presburger::PresburgerSpace::getNumLocalVars(), and mlir::presburger::PresburgerRelation::space.
PresburgerSet PresburgerSet::coalesce | ( | ) | const |
Definition at line 1094 of file PresburgerRelation.cpp.
References mlir::presburger::PresburgerRelation::coalesce(), and PresburgerSet().
PresburgerSet PresburgerSet::complement | ( | ) | const |
Definition at line 1086 of file PresburgerRelation.cpp.
References mlir::presburger::PresburgerRelation::complement(), and PresburgerSet().
|
static |
Return an empty set of the specified type that contains no points.
Definition at line 1068 of file PresburgerRelation.cpp.
References PresburgerSet(), and mlir::presburger::PresburgerRelation::space.
Referenced by mlir::presburger::PWMAFunction::getDomain(), mlir::presburger::PresburgerRelation::getDomainSet(), mlir::presburger::MultiAffineFunction::getLexSet(), and mlir::presburger::PresburgerRelation::getRangeSet().
|
static |
Return a universe set of the specified type that contains all points.
Definition at line 1062 of file PresburgerRelation.cpp.
References mlir::presburger::IntegerPolyhedron::getUniverse(), mlir::presburger::PresburgerRelation::space, and mlir::presburger::PresburgerRelation::unionInPlace().
Referenced by mlir::presburger::detail::computeChamberDecomposition().
PresburgerSet PresburgerSet::intersect | ( | const PresburgerRelation & | set | ) | const |
Definition at line 1082 of file PresburgerRelation.cpp.
References mlir::presburger::PresburgerRelation::intersect(), and PresburgerSet().
Referenced by mlir::presburger::PWMAFunction::addPiece(), mlir::presburger::detail::computeChamberDecomposition(), findSymbolicIntegerLexOpt(), and tiebreakLex().
PresburgerSet PresburgerSet::subtract | ( | const PresburgerRelation & | set | ) | const |
Definition at line 1090 of file PresburgerRelation.cpp.
References PresburgerSet(), and mlir::presburger::PresburgerRelation::subtract().
Referenced by mlir::affine::ComputationSliceState::isMaximal(), and mlir::affine::ComputationSliceState::isSliceValid().
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 1078 of file PresburgerRelation.cpp.
References PresburgerSet(), and mlir::presburger::PresburgerRelation::unionSet().
Referenced by mlir::presburger::IntegerRelation::computeReprWithOnlyDivLocals().