diff options
Diffstat (limited to 'mlir/lib/IR/OperationSupport.cpp')
-rw-r--r-- | mlir/lib/IR/OperationSupport.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mlir/lib/IR/OperationSupport.cpp b/mlir/lib/IR/OperationSupport.cpp index b8f360122239..716239af863c 100644 --- a/mlir/lib/IR/OperationSupport.cpp +++ b/mlir/lib/IR/OperationSupport.cpp @@ -653,7 +653,7 @@ llvm::hash_code OperationEquivalence::computeHash( // - Attributes // - Result Types llvm::hash_code hash = - llvm::hash_combine(op->getName(), op->getAttrDictionary(), + llvm::hash_combine(op->getName(), op->getDiscardableAttrDictionary(), op->getResultTypes(), op->hashProperties()); // - Operands @@ -768,11 +768,13 @@ OperationEquivalence::isRegionEquivalentTo(Region *lhs, Region *rhs, // 1. Compare the operation properties. if (lhs->getName() != rhs->getName() || - lhs->getAttrDictionary() != rhs->getAttrDictionary() || + lhs->getDiscardableAttrDictionary() != + rhs->getDiscardableAttrDictionary() || lhs->getNumRegions() != rhs->getNumRegions() || lhs->getNumSuccessors() != rhs->getNumSuccessors() || lhs->getNumOperands() != rhs->getNumOperands() || - lhs->getNumResults() != rhs->getNumResults()) + lhs->getNumResults() != rhs->getNumResults() || + lhs->hashProperties() != rhs->hashProperties()) return false; if (!(flags & IgnoreLocations) && lhs->getLoc() != rhs->getLoc()) return false; @@ -876,7 +878,9 @@ OperationFingerPrint::OperationFingerPrint(Operation *topOp) { // - Operation pointer addDataToHash(hasher, op); // - Attributes - addDataToHash(hasher, op->getAttrDictionary()); + addDataToHash(hasher, op->getDiscardableAttrDictionary()); + // - Properties + addDataToHash(hasher, op->hashProperties()); // - Blocks in Regions for (Region ®ion : op->getRegions()) { for (Block &block : region) { |