[PATCH] D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 10:02:46 PDT 2021
Orlando added a comment.
Hi @djtodoro I am looking at this (slowly, sorry!).
IIUC this checks that the number of debug intrinsics for each non-inlined variable does not decrease after each optimisation pass. There are legitimate reasons for deleting debug intrinsics. `RemoveRedundantDbgInstrs`, for example, which is called in a few places. With that in mind I think I would prefer the table header "Number of bugs" to change as this number seems to be more of an indicator of possible bugs, rather than proof of their existence.
You might be able to reduce (*) the number of false positive results by ignoring "redundant" debug intrinsics in the count, though maybe that could be follow-up work?
(*) Another example of a false positive, or at least a true positive that we probably want to ignore: I tried this patch out out using a different target codebase and investigated a debug intrinsic dropped in SROA/mem2reg. Amusingly, `git blame` pointed right back at me: D89810 <https://reviews.llvm.org/D89810>. D89810 <https://reviews.llvm.org/D89810>, and D85555 <https://reviews.llvm.org/D85555> which the former is based on, deliberately remove dbg.value+DW_OP_deref intrinsics to work around a common case of location coverage reduction ultimately caused by LowerDbgDeclare.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100845/new/
https://reviews.llvm.org/D100845
More information about the llvm-commits
mailing list