This is an archive of the discontinued LLVM Phabricator instance.

[LoopInfo] Faster implementation of setLoopID. NFC.
ClosedPublic

Authored by loladiro on Apr 26 2019, 3:43 PM.

Details

Summary

This change was part of D46460. However, in the meantime rL341926 fixed the
correctness issue here. What remained was the performance issue in setLoopID
where it would iterate through all blocks in the loop and their successors,
rather than just the predecessor of the header (the later presumably being
much faster). We already have the getLoopLatches to compute precisely these
basic blocks in an efficient manner, so just use it (as the original commit
did for getLoopID).

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro created this revision.Apr 26 2019, 3:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2019, 3:43 PM
This revision is now accepted and ready to land.Apr 26 2019, 9:56 PM
This revision was automatically updated to reflect the committed changes.