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

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 03:41:53 PDT 2020


serge-sans-paille created this revision.
serge-sans-paille added reviewers: foad, nikic.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

The approach is simple: if a pass reports that it's not modifying a
Function/Module, compute a loose hash of that Function/Module and compare it
with the original one. If we report no change but there's a hash change, then we
have an error.

      

This approach misses a lot of change but it's not super intrusive and can
detect most of the simple mistakes.


https://reviews.llvm.org/D80916

Files:
  llvm/lib/IR/LegacyPassManager.cpp
  llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
  llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80916.267572.patch
Type: text/x-patch
Size: 3949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200601/4e5b5e6a/attachment-0001.bin>


More information about the llvm-commits mailing list