Commit f0bd705
authored
[CodeGen] Restore MachineBlockPlacement block ordering (#99351)
PR #91843 changed the algorithm used to find the next unplaced block so
that it iterates through the blocks in BlockFilter instead of iterating
through the blocks in the function and checking if they are in the block
filter. Unfortunately this sometimes results in a different block
ordering being chosen, as the order of blocks in BlockFilter comes from
the order in MachineLoopInfo, and in some cases this differs from the
order they are in the function. This can also give an end result that
has worse performance.
Fix this by making collectLoopBlockSet place blocks in its output in the
order that they are in the function.1 parent 71a8486 commit f0bd705
File tree
2 files changed
+543
-2
lines changed- llvm
- lib/CodeGen
- test/CodeGen/ARM
2 files changed
+543
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2596 | 2596 | | |
2597 | 2597 | | |
2598 | 2598 | | |
2599 | | - | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
2600 | 2608 | | |
2601 | 2609 | | |
2602 | 2610 | | |
| |||
2627 | 2635 | | |
2628 | 2636 | | |
2629 | 2637 | | |
2630 | | - | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
2631 | 2643 | | |
2632 | 2644 | | |
2633 | 2645 | | |
| |||
0 commit comments