forked from OSchip/llvm-project
Fix two more getHashValues.
These were still returning the hash of the pointers resulting in the two getHashValues being different. PiperOrigin-RevId: 223862743
This commit is contained in:
parent
89c41fdca1
commit
bb3ffc1c22
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue