[llvm] [CodeGen] Restore MachineBlockPlacement block ordering (PR #99351)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 13:30:31 PDT 2024
================
@@ -2614,18 +2614,21 @@ MachineBlockPlacement::collectLoopBlockSet(const MachineLoop &L) {
LoopFreq += MBFI->getBlockFreq(LoopPred) *
MBPI->getEdgeProbability(LoopPred, L.getHeader());
- for (MachineBasicBlock *LoopBB : L.getBlocks()) {
- if (LoopBlockSet.count(LoopBB))
+ for (auto &MBB : *F) {
----------------
david-xl wrote:
IIUC, the original patch avoids traversing the full function body to avoid the high complexity in compile time. This will probably restore the old behavior.
https://github.com/llvm/llvm-project/pull/99351
More information about the llvm-commits
mailing list