mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
nak: Run simple liveness data-flow bottom-up
Rookie mistake... The liveness algorithm propagates information from later blocks to earlier blocks so if you run bottom-up it's exactly two passes when there aren't loops. If you run top-down, it's quadratic in the number of blocks. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
046a2d5004
commit
19e0c52837
1 changed files with 1 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ impl SimpleLiveness {
|
|||
let mut to_do = true;
|
||||
while to_do {
|
||||
to_do = false;
|
||||
for (b_idx, bl) in l.blocks.iter_mut().enumerate() {
|
||||
for (b_idx, bl) in l.blocks.iter_mut().enumerate().rev() {
|
||||
/* Compute live-out */
|
||||
for sb_idx in func.blocks.succ_indices(b_idx) {
|
||||
to_do |= bl.live_out.union_with(&live_in[*sb_idx]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue