This is an archive of the discontinued LLVM Phabricator instance.

[IPO] Simplify the module inliner loop (NFC)
ClosedPublic

Authored by kazu on Sep 15 2022, 1:00 PM.

Details

Summary

In the bottom-up inliner, we have a two-level nested "while" loop,
with the inner one grouping call sites with the same caller. We need
to do so to keep CGSCC up to date.

Now, with the module inliner, we don't have any per-caller work. We
don't update CGSCC. Plus, the caller will likely keep changing as we
pop call sites in some priority order.

This patch simply removes the inner "while" loop while indenting its
body. Further cleanup is possible, but that's left for follow-up
patches.

Diff Detail

Event Timeline

kazu created this revision.Sep 15 2022, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 1:00 PM
kazu requested review of this revision.Sep 15 2022, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 1:00 PM

Should this be labeled NFC?

taolq accepted this revision.Sep 16 2022, 7:32 AM

LGTM :)

This revision is now accepted and ready to land.Sep 16 2022, 7:32 AM
kazu added a comment.Sep 16 2022, 8:53 AM

Should this be labeled NFC?

Yes, it's already been labeled NFC.

kazu added a comment.Sep 16 2022, 8:55 AM

LGTM :)

Thanks for the review!

This revision was landed with ongoing or failed builds.Sep 16 2022, 8:56 AM
This revision was automatically updated to reflect the committed changes.