Files
clang-p2996/llvm/lib/CodeGen/MachineBlockPlacement.cpp
William Junda Huang 75882ed4c7 [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.
2024-06-13 22:13:38 -04:00

151 KiB