summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
diff options
context:
space:
mode:
authorWilliam Junda Huang <williamjhuang@google.com>2024-06-13 22:13:38 -0400
committerGitHub <noreply@github.com>2024-06-13 22:13:38 -0400
commit75882ed4c7126b33b1dabb08775af5ee0b2c6e12 (patch)
tree5d90a1cf08a26add8e0d55dd62881595a8bd0e27 /llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
parent836ca5bbf7d6366df7c35ec9d1f235b1ebc9744e (diff)
[Codegen] (NFC) Faster algorithm for MachineBlockPlacement (#91843)
In MachineBlockPlacement, the function getFirstUnplacedBlock is inefficient because in most cases (for usual loop CFG), this function fails to find a candidate, and its complexity becomes O(#(loops in function) * #(blocks in function)). This makes the compilation of very long functions slow. This update reduces it to O(k * #(blocks in function)) where k is the maximum loop nesting depth, by iterating through the BlockFilter instead.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp')
0 files changed, 0 insertions, 0 deletions