This is an archive of the discontinued LLVM Phabricator instance.

Support using sample profiles with partial debug info (driver)
ClosedPublic

Authored by dnovillo on Oct 21 2014, 12:11 PM.

Details

Summary

When using a profile, we used to require the use -gmlt so that we could
get access to the line locations. This is used to match line numbers in
the input profile to the line numbers in the function's IR.

But this is actually not necessary. The driver can provide source
location tracking without the emission of debug information. In these
cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
actual line location annotations are still present.

This patch tells the driver to only emit source location tracking
when -fprofile-sample-use is present in the command line.

Diff Detail

Event Timeline

dnovillo updated this revision to Diff 15200.Oct 21 2014, 12:11 PM
dnovillo retitled this revision from to Support using sample profiles with partial debug info (driver).
dnovillo updated this object.
dnovillo edited the test plan for this revision. (Show Details)
dnovillo added reviewers: echristo, dblaikie.
dnovillo added a subscriber: Unknown Object (MLST).
dnovillo edited subscribers, added: Unknown Object (MLST); removed: Unknown Object (MLST).Oct 21 2014, 12:17 PM
dblaikie edited edge metadata.Oct 21 2014, 12:22 PM

(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))

echristo accepted this revision.Oct 21 2014, 12:39 PM
echristo edited edge metadata.

OK.

-eric

This revision is now accepted and ready to land.Oct 21 2014, 12:39 PM
dnovillo updated this revision to Diff 15205.Oct 21 2014, 2:01 PM
dnovillo edited edge metadata.
  • Update comment for LocTrackingOnly.
dnovillo closed this revision.Oct 22 2014, 6:10 AM
dnovillo updated this revision to Diff 15241.

Closed by commit rL220383 (authored by @dnovillo).