This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add debug locations to constant SD nodes
AbandonedPublic

Authored by sdmitrouk on Apr 17 2015, 10:53 AM.

Details

Reviewers
echristo
resistor
Summary

This adds debug location to constant nodes of Selection DAG and updates
all places that create constants to pass debug locations
(see PR13269).

Can't guarantee that all locations are correct, but in a lot of cases choice
is obvious, so most of them should be. At least all tests pass.

Adding locations also caused reordering of emitted instructions on x86, which
broke three tests, so they were updated as well. Tests for these changes do
not cover everything, instead just check it for SDNodes, ARM and AArch64
where it's easy to get incorrect locations on constants.

This is not complete fix as FastISel contains workaround for wrong debug
locations, which drops locations from instructions on processing constants,
but there isn't currently a way to use debug locations from constants there
as llvm::Constant doesn't cache it (yet). Although this is a bit different
issue, not directly related to these changes.

Note that patch was generated with -U800, -U9999 version can't be
uploaded because of 8 MiB limit for POST requests on the server...

Diff Detail

Repository
rL LLVM

Event Timeline

sdmitrouk updated this revision to Diff 23947.Apr 17 2015, 10:53 AM
sdmitrouk retitled this revision from to [DebugInfo] Add debug locations to constant SD nodes.
sdmitrouk updated this object.
sdmitrouk edited the test plan for this revision. (Show Details)
sdmitrouk added reviewers: echristo, resistor.
sdmitrouk set the repository for this revision to rL LLVM.
sdmitrouk added a subscriber: asl.
sdmitrouk added a subscriber: Unknown Object (MLST).Apr 17 2015, 10:54 AM

Adding the list...

As the warning on Phab says, it's usually best to scrap and create a new
review if you don't have the list on the review from the start - since Phab
won't resend the original summary email with patch attached to the thread.
So the list has very little to go on, from reading this email.

  • David

Thanks, David. Actually I didn't read the warning till the end as I started thinking "Why the hell it shows me this *after* I press Send?".

Created D9084. Sorry for the noise, everybody.

sdmitrouk abandoned this revision.Apr 17 2015, 11:32 AM