This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] Avoid computing potentially unnecessary analyses. NFC
ClosedPublic

Authored by anna on Apr 26 2022, 2:27 PM.

Details

Summary

IRCE is a function pass that operates on loops. If there are no loops in
the function (as seen through LI), we should avoid computing the
remaining expensive analyses (such as BPI). Reordered the analyses
requests and early return if there are no loops. This is an NFC with
compile time improvement.

The same will be done in a follow-up patch for the loop vectorizer.

Diff Detail

Event Timeline

anna created this revision.Apr 26 2022, 2:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 2:27 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
anna requested review of this revision.Apr 26 2022, 2:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 2:27 PM
anna added a reviewer: fhahn.Apr 26 2022, 2:28 PM
nikic accepted this revision.Apr 26 2022, 2:47 PM
nikic added a subscriber: nikic.

LG, this is basically the same thing FunctionToLoopPassAdaptor does.

This revision is now accepted and ready to land.Apr 26 2022, 2:47 PM
anna added a comment.Apr 26 2022, 7:18 PM

thanks for the quick review!

fhahn accepted this revision.Apr 27 2022, 1:16 AM

Nice, LGTM!

mkazantsev accepted this revision.Apr 27 2022, 5:37 AM
This revision was landed with ongoing or failed builds.Apr 27 2022, 6:22 AM
This revision was automatically updated to reflect the committed changes.