diff options
author | Teresa Johnson <tejohnson@google.com> | 2024-07-30 13:08:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-30 13:08:56 -0700 |
commit | 245e6070daa191b1fc6ce05d8fc38a74f918159a (patch) | |
tree | 9ab3bed4a94a3fe73da93acc0033538453c0f524 /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h | |
parent | 9843843c88f6cd8fa68c301ba751c001c254cb63 (diff) | |
download | llvm-245e6070daa191b1fc6ce05d8fc38a74f918159a.zip llvm-245e6070daa191b1fc6ce05d8fc38a74f918159a.tar.gz llvm-245e6070daa191b1fc6ce05d8fc38a74f918159a.tar.bz2 |
[LoopSink] Exit loop finding BBs to sink into early when possible (NFC) (#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).
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions