Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LoopSink] Exit loop finding BBs to sink into early when possible (NF…
…C) (#101115) As noted in the comments, findBBsToSinkInto is O(UseBBs.size() * ColdLoopBBs.size()) A very large function with a huge loop was incurring a high compile time in this code. The size of the ColdLoopBBs set was over 14K. There is a limit on the size of the UseBBs set, but not the ColdLoopBBs (and adding a limit for the latter actually slowed down some later passes). This change exits the loop early once we detect that there is no further refinement possible for the BBsToSinkInto set. This is possible because the ColdLoopBBs set is sorted in ascending magnitude of frequency. This cut down the LoopSinkPass time by around 33% (78s to just over 50s).
- Loading branch information