<div dir="ltr">(driver code review should be sent to the cfe-commits list - just abandon this CR and create a new one (because you can never get Phab to resend the initial, informative (with patch attached, summary, etc) email again to the list - so just switching mailing lists won't produce a good experience for Clang developers reading their mailing list who aren't subscribed to this one))</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 21, 2014 at 12:11 PM, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank">dnovillo@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi echristo, dblaikie,<br>
<br>
When using a profile, we used to require the use -gmlt so that we could<br>
get access to the line locations. This is used to match line numbers in<br>
the input profile to the line numbers in the function's IR.<br>
<br>
But this is actually not necessary. The driver can provide source<br>
location tracking without the emission of debug information. In these<br>
cases, the annotation '<a href="http://llvm.dbg.cu" target="_blank">llvm.dbg.cu</a>' is missing from the IR, but the<br>
actual line location annotations are still present.<br>
<br>
This patch tells the driver to only emit source location tracking<br>
when -fprofile-sample-use is present in the command line.<br>
<br>
<a href="http://reviews.llvm.org/D5888" target="_blank">http://reviews.llvm.org/D5888</a><br>
<br>
Files:<br>
  lib/Frontend/CompilerInvocation.cpp<br>
  test/Frontend/Inputs/profile-sample-use-loc-tracking.prof<br>
  test/Frontend/profile-sample-use-loc-tracking.c<br>
</blockquote></div><br></div>