This is an archive of the discontinued LLVM Phabricator instance.

Improve the effectiveness of BDCE's debug info salvaging
ClosedPublic

Authored by aprantl on Sep 27 2021, 10:15 AM.

Details

Summary

This patch improves the effectiveness of BDCE's debug info salvaging by processing the instructions in reverse order and delaying dropAllReferences until after debug info salvaging. This allows salvaging of entire chains of deleted instructions!

Previously we would remove all references from an instruction, which would make it impossible to use that instruction to salvage a later instruction in the instruction stream, because its operands were already removed.

See also https://reviews.llvm.org/D110462

Diff Detail

Event Timeline

aprantl created this revision.Sep 27 2021, 10:15 AM
aprantl requested review of this revision.Sep 27 2021, 10:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2021, 10:15 AM
djtodoro accepted this revision.Sep 28 2021, 2:04 AM

lgtm, thanks!

This revision is now accepted and ready to land.Sep 28 2021, 2:04 AM
This revision was landed with ongoing or failed builds.Sep 28 2021, 10:25 AM
This revision was automatically updated to reflect the committed changes.
nikic reopened this revision.Sep 28 2021, 12:55 PM
nikic added a subscriber: nikic.

I've reverted this in https://github.com/llvm/llvm-project/commit/abbbc480a152c1afbac215064f22ae07c87ed964 because it causes an assertion failure during the test-suite build (using O3.cmake).

This revision is now accepted and ready to land.Sep 28 2021, 12:55 PM

I've reverted this in https://github.com/llvm/llvm-project/commit/abbbc480a152c1afbac215064f22ae07c87ed964 because it causes an assertion failure during the test-suite build (using O3.cmake).

Thanks! It looks like it also triggered the asan bot. I'll take a look.

This revision was automatically updated to reflect the committed changes.