diff options
Diffstat (limited to 'mlir/lib')
| -rw-r--r-- | mlir/lib/IR/MLIRContext.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp index d00e9aebd84..b344f7475d8 100644 --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -73,9 +73,13 @@ struct AffineMapKeyInfo : DenseMapInfo<AffineMap> { // expressions. using KeyTy = std::tuple<unsigned, unsigned, ArrayRef<AffineExpr>, ArrayRef<AffineExpr>>; - using DenseMapInfo<AffineMap>::getHashValue; using DenseMapInfo<AffineMap>::isEqual; + static unsigned getHashValue(const AffineMap &key) { + return getHashValue(KeyTy(key.getNumDims(), key.getNumSymbols(), + key.getResults(), key.getRangeSizes())); + } + static unsigned getHashValue(KeyTy key) { return hash_combine( std::get<0>(key), std::get<1>(key), @@ -96,9 +100,13 @@ struct IntegerSetKeyInfo : DenseMapInfo<IntegerSet> { // expressions appearing in the LHS of constraints, and eqFlags. using KeyTy = std::tuple<unsigned, unsigned, ArrayRef<AffineExpr>, ArrayRef<bool>>; - using DenseMapInfo<IntegerSet>::getHashValue; using DenseMapInfo<IntegerSet>::isEqual; + static unsigned getHashValue(const IntegerSet &key) { + return getHashValue(KeyTy(key.getNumDims(), key.getNumSymbols(), + key.getConstraints(), key.getEqFlags())); + } + static unsigned getHashValue(KeyTy key) { return hash_combine( std::get<0>(key), std::get<1>(key), |

