[PATCH] D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 05:12:05 PDT 2021


djtodoro created this revision.
djtodoro added reviewers: aprantl, vsk, probinson, jmorse, dblaikie, Orlando, StephenTozer.
djtodoro added a project: debug-info.
Herald added subscribers: wenlei, hiraditya.
djtodoro requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is an improvement of [0]. This adds checking of original llvm.dbg.values()/declares() instructions in optimizations.

We have picked a real issue that has been found with this (actually, picked one variable location missing from [1] and resolved the issue), and the result is the fix for that -- D100844 <https://reviews.llvm.org/D100844>.

Before applying the D100844 <https://reviews.llvm.org/D100844>, using the options from [0] (but with this patch applied) on the compilation of GDB 7.11, the final HTML report for the debug-info issues can be found at [1] (please scroll down, and look for "Summary of Variable Location Bugs"). After applying the D100844 <https://reviews.llvm.org/D100844>, the numbers has improved a bit -- please take a look into [2].

[0] https://llvm.org/docs/HowToUpdateDebugInfo.html#test-original-debug-info-preservation-in-optimizations
[1] https://djolertrk.github.io/di-check-before-adce-fix/
[2] https://djolertrk.github.io/di-check-after-adce-fix/


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100845

Files:
  llvm/include/llvm/Transforms/Utils/Debugify.h
  llvm/lib/Transforms/Utils/Debugify.cpp
  llvm/test/tools/llvm-original-di-preservation/Inputs/expected-sample.html
  llvm/unittests/Transforms/Utils/DebugifyTest.cpp
  llvm/utils/llvm-original-di-preservation.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100845.338828.patch
Type: text/x-patch
Size: 18685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/f8a25968/attachment.bin>


More information about the llvm-commits mailing list