[Mlir-commits] [mlir] ae9288d - [mlir][IR] Hash result types in OperationFingerPrint

Matthias Springer llvmlistbot at llvm.org
Fri Mar 3 06:07:34 PST 2023


Author: Matthias Springer
Date: 2023-03-03T15:07:24+01:00
New Revision: ae9288d471ec02c8812091ba43b92a5dbec6c38f

URL: https://github.com/llvm/llvm-project/commit/ae9288d471ec02c8812091ba43b92a5dbec6c38f
DIFF: https://github.com/llvm/llvm-project/commit/ae9288d471ec02c8812091ba43b92a5dbec6c38f.diff

LOG: [mlir][IR] Hash result types in OperationFingerPrint

Result types were not considered in OperationFingerPrint. This can lead to missing IR dumps when running with `shouldPrintAfterOnlyOnChange` and false positives in D144552.

Differential Revision: https://reviews.llvm.org/D145152

Added: 
    

Modified: 
    mlir/lib/IR/OperationSupport.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/OperationSupport.cpp b/mlir/lib/IR/OperationSupport.cpp
index f6167be20cf83..f2a2fc2400444 100644
--- a/mlir/lib/IR/OperationSupport.cpp
+++ b/mlir/lib/IR/OperationSupport.cpp
@@ -873,6 +873,9 @@ OperationFingerPrint::OperationFingerPrint(Operation *topOp) {
     //   - Successors
     for (unsigned i = 0, e = op->getNumSuccessors(); i != e; ++i)
       addDataToHash(hasher, op->getSuccessor(i));
+    //   - Result types
+    for (Type t : op->getResultTypes())
+      addDataToHash(hasher, t);
   });
   hash = hasher.result();
 }


        


More information about the Mlir-commits mailing list