| 
    MLIR 22.0.0git
    
   | 
 
An integer set representing a conjunction of one or more affine equalities and inequalities. More...
#include "mlir/IR/IntegerSet.h"
Public Types | |
| using | ImplType = detail::IntegerSetStorage | 
Public Member Functions | |
| constexpr | IntegerSet ()=default | 
| IntegerSet (ImplType *set) | |
| bool | isEmptyIntegerSet () const | 
| Returns true if this is the canonical integer set.   | |
| IntegerSet | replaceDimsAndSymbols (ArrayRef< AffineExpr > dimReplacements, ArrayRef< AffineExpr > symReplacements, unsigned numResultDims, unsigned numResultSyms) | 
| This method substitutes any uses of dimensions and symbols (e.g.   | |
| operator bool () | |
| bool | operator== (IntegerSet other) const | 
| bool | operator!= (IntegerSet other) const | 
| unsigned | getNumDims () const | 
| unsigned | getNumSymbols () const | 
| unsigned | getNumInputs () const | 
| unsigned | getNumConstraints () const | 
| unsigned | getNumEqualities () const | 
| unsigned | getNumInequalities () const | 
| ArrayRef< AffineExpr > | getConstraints () const | 
| AffineExpr | getConstraint (unsigned idx) const | 
| ArrayRef< bool > | getEqFlags () const | 
| Returns the equality bits, which specify whether each of the constraints is an equality or inequality.   | |
| bool | isEq (unsigned idx) const | 
| Returns true if the idx^th constraint is an equality, false if it is an inequality.   | |
| MLIRContext * | getContext () const | 
| void | walkExprs (function_ref< void(AffineExpr)> callback) const | 
| Walk all of the AffineExpr's in this set's constraints.   | |
| void | print (raw_ostream &os) const | 
| void | dump () const | 
| friend::llvm::hash_code | hash_value (IntegerSet arg) | 
| const void * | getAsOpaquePointer () const | 
| Methods supporting C API.   | |
Static Public Member Functions | |
| static IntegerSet | get (unsigned dimCount, unsigned symbolCount, ArrayRef< AffineExpr > constraints, ArrayRef< bool > eqFlags) | 
| static IntegerSet | getEmptySet (unsigned numDims, unsigned numSymbols, MLIRContext *context) | 
| static IntegerSet | getFromOpaquePointer (const void *pointer) | 
An integer set representing a conjunction of one or more affine equalities and inequalities.
An integer set in the IR is immutable like the affine map, but integer sets are not unique'd unless the number of constraints in them is below kUniquingThreshold. The affine expressions that make up the equalities and inequalities of an integer set are themselves unique and are allocated by the bump pointer allocator.
Definition at line 44 of file IntegerSet.h.
Definition at line 46 of file IntegerSet.h.
      
  | 
  constexprdefault | 
Referenced by get(), getEmptySet(), getFromOpaquePointer(), hash_value(), operator!=(), operator==(), and replaceDimsAndSymbols().
      
  | 
  inlineexplicit | 
Definition at line 49 of file IntegerSet.h.
| void IntegerSet::dump | ( | ) | const | 
Definition at line 4008 of file AsmPrinter.cpp.
References print().
      
  | 
  static | 
Definition at line 1250 of file MLIRContext.cpp.
References IntegerSet().
Referenced by composeSetAndOperands(), mlir::FlatLinearConstraints::getAsIntegerSet(), getEmptySet(), mlirIntegerSetGet(), and replaceDimsAndSymbols().
      
  | 
  inline | 
Methods supporting C API.
Definition at line 111 of file IntegerSet.h.
| AffineExpr IntegerSet::getConstraint | ( | unsigned | idx | ) | const | 
Definition at line 45 of file IntegerSet.cpp.
References getConstraints().
Referenced by getContext(), and mlir::AsmPrinter::Impl::printIntegerSet().
| ArrayRef< AffineExpr > IntegerSet::getConstraints | ( | ) | const | 
Definition at line 41 of file IntegerSet.cpp.
Referenced by composeSetAndOperands(), getConstraint(), mlir::getFlattenedAffineExprs(), replaceDimsAndSymbols(), and walkExprs().
| MLIRContext * IntegerSet::getContext | ( | ) | const | 
Definition at line 57 of file IntegerSet.cpp.
References getConstraint(), and mlir::AffineExpr::getContext().
Referenced by composeSetAndOperands(), isEmptyIntegerSet(), and mlir::affine::simplifyIntegerSet().
      
  | 
  inlinestatic | 
Definition at line 56 of file IntegerSet.h.
References get(), mlir::getAffineConstantExpr(), and IntegerSet().
Referenced by isEmptyIntegerSet(), mlirIntegerSetEmptyGet(), and mlir::affine::simplifyIntegerSet().
Returns the equality bits, which specify whether each of the constraints is an equality or inequality.
Definition at line 51 of file IntegerSet.cpp.
Referenced by composeSetAndOperands(), mlir::FlatLinearValueConstraints::FlatLinearValueConstraints(), isEq(), and replaceDimsAndSymbols().
      
  | 
  inlinestatic | 
Definition at line 114 of file IntegerSet.h.
References IntegerSet().
| unsigned IntegerSet::getNumConstraints | ( | ) | const | 
Definition at line 21 of file IntegerSet.cpp.
Referenced by mlir::FlatLinearValueConstraints::FlatLinearValueConstraints(), mlir::getFlattenedAffineExprs(), getNumEqualities(), getNumInequalities(), mlir::AsmPrinter::Impl::printIntegerSet(), and replaceDimsAndSymbols().
| unsigned IntegerSet::getNumDims | ( | ) | const | 
Definition at line 15 of file IntegerSet.cpp.
Referenced by composeSetAndOperands(), mlir::getFlattenedAffineExprs(), mlir::AsmPrinter::Impl::printIntegerSet(), and mlir::affine::simplifyIntegerSet().
| unsigned IntegerSet::getNumEqualities | ( | ) | const | 
Definition at line 25 of file IntegerSet.cpp.
References getNumConstraints(), and isEq().
Referenced by getNumInequalities().
| unsigned IntegerSet::getNumInequalities | ( | ) | const | 
Definition at line 33 of file IntegerSet.cpp.
References getNumConstraints(), and getNumEqualities().
| unsigned IntegerSet::getNumInputs | ( | ) | const | 
Definition at line 17 of file IntegerSet.cpp.
Referenced by mlir::FlatLinearValueConstraints::FlatLinearValueConstraints().
| unsigned IntegerSet::getNumSymbols | ( | ) | const | 
Definition at line 16 of file IntegerSet.cpp.
Referenced by composeSetAndOperands(), mlir::getFlattenedAffineExprs(), mlir::AsmPrinter::Impl::printIntegerSet(), and mlir::affine::simplifyIntegerSet().
| friend::llvm::hash_code mlir::IntegerSet::hash_value | ( | IntegerSet | arg | ) | 
References IntegerSet().
| bool IntegerSet::isEmptyIntegerSet | ( | ) | const | 
Returns true if this is the canonical integer set.
Definition at line 37 of file IntegerSet.cpp.
References getContext(), and getEmptySet().
Returns true if the idx^th constraint is an equality, false if it is an inequality.
Definition at line 55 of file IntegerSet.cpp.
References getEqFlags().
Referenced by getNumEqualities(), and mlir::AsmPrinter::Impl::printIntegerSet().
      
  | 
  inlineexplicit | 
Definition at line 76 of file IntegerSet.h.
      
  | 
  inline | 
Definition at line 78 of file IntegerSet.h.
References IntegerSet().
      
  | 
  inline | 
Definition at line 77 of file IntegerSet.h.
References IntegerSet().
| void IntegerSet::print | ( | raw_ostream & | os | ) | const | 
Definition at line 4036 of file AsmPrinter.cpp.
References getContext(), mlir::AsmState::getImpl(), and mlir::AsmPrinter::Impl::printIntegerSet().
| IntegerSet IntegerSet::replaceDimsAndSymbols | ( | ArrayRef< AffineExpr > | dimReplacements, | 
| ArrayRef< AffineExpr > | symReplacements, | ||
| unsigned | numResultDims, | ||
| unsigned | numResultSyms ) | 
This method substitutes any uses of dimensions and symbols (e.g.
dim#0 with dimReplacements[0]) in subexpressions and returns the modified integer set. Because this can be used to eliminate dims and symbols, the client needs to specify the number of dims and symbols in the result. The returned map always has the same number of results.
Definition at line 68 of file IntegerSet.cpp.
References get(), getConstraints(), getEqFlags(), getNumConstraints(), and IntegerSet().
| void IntegerSet::walkExprs | ( | function_ref< void(AffineExpr)> | callback | ) | const | 
Walk all of the AffineExpr's in this set's constraints.
Walk all of the AffineExpr's in this set.
Each node in an expression tree is visited in postorder.
Definition at line 63 of file IntegerSet.cpp.
References getConstraints().