diff --git a/mlir/include/mlir/IR/IntegerSet.h b/mlir/include/mlir/IR/IntegerSet.h --- a/mlir/include/mlir/IR/IntegerSet.h +++ b/mlir/include/mlir/IR/IntegerSet.h @@ -11,7 +11,8 @@ // integer sets in the IR - for 'affine.if' operations and as attributes of // other operations. It is typically expected to contain only a handful of // affine constraints, and is immutable like an affine map. Integer sets are not -// unique'd - although affine expressions that make up its equalities and +// unique'd unless the number of constraints they contain are below a certain +// threshold - although affine expressions that make up its equalities and // inequalities are themselves unique. // This class is not meant for affine analysis and operations like set @@ -30,13 +31,14 @@ namespace detail { struct IntegerSetStorage; -} +} // end namespace detail class MLIRContext; /// 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. The affine expressions that make up the +/// 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. class IntegerSet { @@ -54,7 +56,7 @@ static IntegerSet getEmptySet(unsigned numDims, unsigned numSymbols, MLIRContext *context) { auto one = getAffineConstantExpr(1, context); - /* 1 == 0 */ + // 1 == 0. return get(numDims, numSymbols, one, true); } @@ -127,14 +129,14 @@ } // end namespace mlir namespace llvm { -// IntegerSet hash just like pointers +// IntegerSet hash just like pointers. template <> struct DenseMapInfo { static mlir::IntegerSet getEmptyKey() { - auto pointer = llvm::DenseMapInfo::getEmptyKey(); + auto *pointer = llvm::DenseMapInfo::getEmptyKey(); return mlir::IntegerSet(static_cast(pointer)); } static mlir::IntegerSet getTombstoneKey() { - auto pointer = llvm::DenseMapInfo::getTombstoneKey(); + auto *pointer = llvm::DenseMapInfo::getTombstoneKey(); return mlir::IntegerSet(static_cast(pointer)); } static unsigned getHashValue(mlir::IntegerSet val) {