[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 13:37:48 PDT 2020
dsanders added a comment.
In D77575#1964990 <https://reviews.llvm.org/D77575#1964990>, @vsk wrote:
> Why not generalize this to something like -mir-print-debug-info, which, when set to false, makes the MIR printer stop printing DBG_ meta instructions as well? Then you might not need D77438 <https://reviews.llvm.org/D77438>.
My preference is to have a debug info stripping pass which you can include in your pipeline so that there's none left for the printer to print but I haven't done that yet. The change in D77438 <https://reviews.llvm.org/D77438> is still needed for other reasons though. It's a bug but DEBUG_VALUE affects CodeGen quite a bit as it causes hasOneUse() to return false when it would otherwise return true. Most of the backends are using hasOneUse when they probably meant hasOneNonDbgUse() but it's also not a simple replacement as you still need to do something about the DEBUG_VALUE. D77438 <https://reviews.llvm.org/D77438> allows backends to make progress on location preservation without dealing with their DEBUG_VALUE bugs at the same time.
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