[Mlir-commits] [mlir] [MLIR] Allow comparison of opaque properties (PR #66378)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Sep 17 23:36:24 PDT 2023


================
@@ -768,7 +768,9 @@ OperationEquivalence::isRegionEquivalentTo(Region *lhs, Region *rhs,
       lhs->getNumSuccessors() != rhs->getNumSuccessors() ||
       lhs->getNumOperands() != rhs->getNumOperands() ||
       lhs->getNumResults() != rhs->getNumResults() ||
-      lhs->hashProperties() != rhs->hashProperties())
+      lhs->hashProperties() != rhs->hashProperties() ||
+      !lhs->getName().compareOpProperties(lhs->getPropertiesStorage(),
+                                        rhs->getPropertiesStorage()))
----------------
Dudeldu wrote:

You are probably right for most cases. And for the few exceptions, where hashing actually yields an advantage, it can still be considered when overloading the equality operator for the specific type of properties.

https://github.com/llvm/llvm-project/pull/66378


More information about the Mlir-commits mailing list