forked from OSchip/llvm-project
[MLIR][NFC] Fix clang-tidy warnings in IntegerSet.h
Fix clang-tidy warnings and some comments in IntegerSet.h. NFC. Differential Revision: https://reviews.llvm.org/D102387
This commit is contained in:
parent
d56729b4a4
commit
1d2ce7d6d6
|
@ -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 mlir {
|
|||
|
||||
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 @@ public:
|
|||
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 @@ inline ::llvm::hash_code hash_value(IntegerSet arg) {
|
|||
} // end namespace mlir
|
||||
namespace llvm {
|
||||
|
||||
// IntegerSet hash just like pointers
|
||||
// IntegerSet hash just like pointers.
|
||||
template <> struct DenseMapInfo<mlir::IntegerSet> {
|
||||
static mlir::IntegerSet getEmptyKey() {
|
||||
auto pointer = llvm::DenseMapInfo<void *>::getEmptyKey();
|
||||
auto *pointer = llvm::DenseMapInfo<void *>::getEmptyKey();
|
||||
return mlir::IntegerSet(static_cast<mlir::IntegerSet::ImplType *>(pointer));
|
||||
}
|
||||
static mlir::IntegerSet getTombstoneKey() {
|
||||
auto pointer = llvm::DenseMapInfo<void *>::getTombstoneKey();
|
||||
auto *pointer = llvm::DenseMapInfo<void *>::getTombstoneKey();
|
||||
return mlir::IntegerSet(static_cast<mlir::IntegerSet::ImplType *>(pointer));
|
||||
}
|
||||
static unsigned getHashValue(mlir::IntegerSet val) {
|
||||
|
|
Loading…
Reference in New Issue