[PATCH] D80916: [LegacyPM] Double check that passes correctly set their Modified status

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 04:14:35 PDT 2020


foad added inline comments.


================
Comment at: llvm/lib/IR/LegacyPassManager.cpp:1497
+  for (auto &F : M)
+    functionHash(F);
+  return H.getHash();
----------------
This doesn't even compile because the definition of FunctionHash has a capital F.


================
Comment at: llvm/lib/IR/LegacyPassManager.cpp:1546
+
+      assert(!LocalChanged && (RefHash != FunctionHash(F)) &&
+             "Pass modifies its input and doesn't report it.");
----------------
This is the wrong way round. You want to assert that `LocalChanged || RefHash == FunctionHash(F)`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80916/new/

https://reviews.llvm.org/D80916





More information about the llvm-commits mailing list