2 Commits

Author SHA1 Message Date
Vedant Kumar
9e729a33ef [opt] Introduce -strip-named-metadata
This renames and generalizes -strip-module-flags to erase all named
metadata from a module. This makes it easier to diff IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333977 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-05 00:56:08 +00:00
Vedant Kumar
8c3bbfcc15 [Debugify] Preserve analyses in -check-debugify
The -check-debugify pass should preserve all analyses. Otherwise, it may
invalidate an optional analysis and inadvertently alter codegen.

The test case is reduced from deopt-bundle.ll. The result of `opt -O1`
on this file would differ when -debugify-each was toggled. That happened
because CheckDebugify failed to preserve GlobalsAA.

Thanks to Davide Italiano for his help chasing this down!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333959 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 21:43:28 +00:00