mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nak: Compute liveness in reverse block order
If we walk the blocks forwards, we end up having a minimum O(n^2) algorithm because everything has to propagate bottom to top. Looping over the blocks bacwards ensures that all the liveness information is propgated in the first pass in the absence of back edges. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
82f0c6cf77
commit
f67fecf196
1 changed files with 1 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ impl Liveness {
|
|||
let mut to_do = true;
|
||||
while to_do {
|
||||
to_do = false;
|
||||
for b in &func.blocks {
|
||||
for b in func.blocks.iter().rev() {
|
||||
let bl = l.blocks.get_mut(&b.id).unwrap();
|
||||
|
||||
/* Compute live-out */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue