<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 6, 2017, at 3:24 AM, Alex Bradbury via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 5 September 2017 at 21:00, Reid Kleckner via llvm-dev<br class=""><<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""><blockquote type="cite" class="">Debug info today handles two cases reasonably well:<br class="">1. At -O0, dbg.declare does a good job describing variables that live at<br class="">some known stack offset<br class="">2. With optimizations, variables promoted to SSA can be described with<br class="">dbg.value<br class=""><br class="">This leaves behind a large hole in our optimized debug info: variables that<br class="">cannot be promoted, typically because they are address-taken. This is<br class=""><a href="https://llvm.org/pr34136" class="">https://llvm.org/pr34136</a>, and this RFC is mostly about addressing that.<br class=""><br class="">The status today is that instcombine removes all dbg.declares and<br class="">heuristically inserts dbg.values where it can identify the value of the<br class="">variable in question. This prevents us from having misleading debug info,<br class="">but it throws away information about the variable’s location in memory.<br class=""></blockquote><br class="">Hi Reid, thanks for writing such a clear summary of the problem that<br class="">this RFC addresses. I was wondering if there is any sort of<br class="">methodology for quantifying the "quality" of debug information? e.g.<br class="">the gap between the current debug information and 'ideal' debug info?<br class=""></div></div></blockquote><div><br class=""></div>It is difficult. One thing we can do is measure the delta between the debug info quality of two compiler version (<a href="https://reviews.llvm.org/D36627" class="">https://reviews.llvm.org/D36627</a> adds an option to collect various metrics to that end to llvm-dwarfdump).</div><div><br class=""></div><div>-- adrian<br class=""></div><br class=""></body></html>