[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 03:24:46 PDT 2017


On 5 September 2017 at 21:00, Reid Kleckner via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Debug info today handles two cases reasonably well:
> 1. At -O0, dbg.declare does a good job describing variables that live at
> some known stack offset
> 2. With optimizations, variables promoted to SSA can be described with
> dbg.value
>
> This leaves behind a large hole in our optimized debug info: variables that
> cannot be promoted, typically because they are address-taken. This is
> https://llvm.org/pr34136, and this RFC is mostly about addressing that.
>
> The status today is that instcombine removes all dbg.declares and
> heuristically inserts dbg.values where it can identify the value of the
> variable in question. This prevents us from having misleading debug info,
> but it throws away information about the variable’s location in memory.

Hi Reid, thanks for writing such a clear summary of the problem that
this RFC addresses. I was wondering if there is any sort of
methodology for quantifying the "quality" of debug information? e.g.
the gap between the current debug information and 'ideal' debug info?

Thanks,

Alex


More information about the llvm-dev mailing list