This is an archive of the discontinued LLVM Phabricator instance.

Preserve DebugInfo when replacing values in DAGCombiner
ClosedPublic

Authored by niravd on Jun 6 2016, 12:53 PM.

Details

Summary

[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.

Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.

This fixes PR9817 which was only partially checked in the testsuite.

Diff Detail

Repository
rL LLVM

Event Timeline

niravd updated this revision to Diff 59768.Jun 6 2016, 12:53 PM
niravd retitled this revision from to Preserve DebugInfo when replacing values in DAGCombiner.
niravd updated this object.
niravd added a reviewer: jyknight.
niravd added a subscriber: llvm-commits.

Test cases - and also, ideally, it'd be good to find a narrower place to do
this - having to do it in 5 different places/ways seems like we might
easily be missing places (or miss them in the future)?

niravd updated this revision to Diff 59898.Jun 7 2016, 9:03 AM

Test case, remove extra TransferDbgValues calls

niravd updated this object.Jun 7 2016, 9:06 AM
jyknight accepted this revision.Jun 15 2016, 6:37 AM
jyknight edited edge metadata.

Also, ideally, it'd be good to find a narrower place to do
this - having to do it in 5 different places/ways seems like we might
easily be missing places (or miss them in the future)?

Given the structure of the existing code, which has 5 different Replace*Uses*With functions implemented next to each-other with a bunch of duplicate-ish code, having a call to this function from each of those -- and not needing to spread it around in other places -- seems good to me.

This revision is now accepted and ready to land.Jun 15 2016, 6:37 AM
This revision was automatically updated to reflect the committed changes.