This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Print pre-transformation IR name in --print-after-all
ClosedPublic

Authored by aeubanks on Jul 19 2021, 10:38 AM.

Details

Summary

Sometimes a transformation can change the name of some IR (e.g. an SCC
with functions added/removed). This can be confusing when debug logging
doesn't match the post-transformation name. The specific example I came
across was that --print-after-all said the inliner was working on an SCC
that only contained one function, but calls in multiple functions were
getting inlined. After all inlining, the current SCC only contained one
function.

Piggyback off of the existing logic to handle invalidated IR +
--print-module-scope. Simply always store the IR description and use
that.

Diff Detail

Event Timeline

aeubanks created this revision.Jul 19 2021, 10:38 AM
aeubanks requested review of this revision.Jul 19 2021, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2021, 10:38 AM
This revision is now accepted and ready to land.Jul 20 2021, 9:51 AM
This revision was landed with ongoing or failed builds.Jul 20 2021, 10:20 AM
This revision was automatically updated to reflect the committed changes.