[llvm-dev] [DebugInfo] RFC: Introduce LLVM DI Checker utility

Djordje via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 17 02:10:56 PDT 2020


I am sharing the proposal [0] which gives a brief introduction for the 
implementation of the LLVM DI Checker utility. On a very high level, it 
is a pair of LLVM (IR) Passes that check the preservation of the 
original debug info in the optimizations. There are options controlling 
the passes, that could be invoked from ``clang`` as well as from ``opt`` 

By testing the utility on the GDB 7.11 project (using it as a testbed), 
it has found a certain number of potential issues regarding the 
DILocations (using it on LLVM project build itself, it has found one bug 
regarding DISubprogram metadata). Please take a look into the final 
report (on the GDB 7.11 testbed) generated from the script that collects 
the data at [1]. By looking at these data, it looks that the utility 
like this could be useful when trying to detect the real issues related 
to debug info production by the compiler.

Any thoughts on this? Thanks in advance!

[0] https://github.com/djolertrk/llvm-di-checker
[1] https://djolertrk.github.io/di-checker-html-report-example/

Best regards,

More information about the llvm-dev mailing list