[PATCH] D77575: [debugify] Add way to omit debug-location from MIR output

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 14:43:31 PDT 2020


dsanders added a comment.

In D77575#1965264 <https://reviews.llvm.org/D77575#1965264>, @aprantl wrote:

> > In lieu of a proper pass that strips debug info
>
> What is it that you need? Something like llvm::stripDebugInfo() (from DebugInfo.cpp) but for MIR? That should be very easy to adapt.


Yes, it's essentially stripDebugInfo() for MIR along with a pass wrapper that just calls it. The reason for wrapping it in a pass is that you can then go on to something akin to -verify-machineinstrs but with a pipeline like `mir-debugify,<pass1>,strip-mir-debug,mir-debugify,<pass2>,strip-mir-debug`. At that point Pass2's ability to test for location loss isn't dependent on Pass1's ability to preserve the locations from the first mir-debugify.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77575





More information about the llvm-commits mailing list