[llvm-dev] RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value

Alex Bradbury via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 6 10:39:35 PDT 2017

On 6 September 2017 at 18:18, Robinson, Paul <paul.robinson at sony.com> wrote:
> Hi Alex,
> The usual oracle for execution-related debug info is "what you get at -O0."
> More abstractly, you would like to be able to stop at any source statement,
> and have any in-scope variable's value available for display (and possibly
> for modification).
> At my previous employer we built a tool that compared the set of breakpoint
> locations at -O0 to -O1/-O2, and also compared the ranges where a variable
> had a defined location to the range of code for its lexical scope.  This
> gives you computable metrics such that you can readily tell when things have
> gotten "better" or "worse" compared to some previous compiler version (or
> competitor compiler).

That sounds great. It would also be interesting to compare these
metrics between different targets, which might indicate whether a
target-specific optimisation is damaging debug info quality vs another
target. Of course this would only give a very rough comparison.

> There's no open-source tool that does this at the moment, that I'm aware of,
> although we are working on publishing our DIVA tool (see our lightning talk
> at EuroLLVM earlier this year).

I'd seen the slides from that talk, and eagerly await the open sourcing of DIVA!



More information about the llvm-dev mailing list