This is an archive of the discontinued LLVM Phabricator instance.

[GlobalOpt] Preserve CFG analyses
ClosedPublic

Authored by aeubanks on Jun 19 2022, 1:02 PM.

Details

Summary

The only place we modify the CFG is when calling
removeUnreachableBlocks(), so insert a callback there which invalidates
analyses for that function (or recomputes DT in the legacy PM).

We may delete functions, make sure to clear analyses for those functions.

Small compile time wins across the board:
https://llvm-compile-time-tracker.com/compare.php?from=f444ea8ce0aaaa5ec1a4129809389da15cc41396&to=698f41f4fc26cbf1006ed5d88e9d658edfc5b749&stat=instructions

Diff Detail

Event Timeline

aeubanks created this revision.Jun 19 2022, 1:02 PM
Herald added a reviewer: ctetreau. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Jun 19 2022, 1:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2022, 1:02 PM
nikic accepted this revision.Jun 19 2022, 2:19 PM

LGTM

This revision is now accepted and ready to land.Jun 19 2022, 2:19 PM
This revision was landed with ongoing or failed builds.Jun 19 2022, 4:13 PM
This revision was automatically updated to reflect the committed changes.
aeubanks reopened this revision.Jun 20 2022, 8:53 PM
This revision is now accepted and ready to land.Jun 20 2022, 8:53 PM
aeubanks edited the summary of this revision. (Show Details)Jun 20 2022, 8:54 PM
nikic accepted this revision.Jun 21 2022, 12:22 AM
nikic added inline comments.
llvm/lib/Transforms/IPO/GlobalOpt.cpp
1918

Spurious newline?

This revision was landed with ongoing or failed builds.Jun 21 2022, 9:23 AM
This revision was automatically updated to reflect the committed changes.