mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
nir/liveness: Consider if uses in nir_ssa_defs_interfere
Fixes:f86902e75d"nir: Add an SSA-based liveness analysis pass" Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3428 Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6824> (cherry picked from commit0206fb3941)
This commit is contained in:
parent
520d023bfb
commit
083b992f9d
2 changed files with 10 additions and 1 deletions
|
|
@ -301,7 +301,7 @@
|
|||
"description": "nir/liveness: Consider if uses in nir_ssa_defs_interfere",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "f86902e75d989b781be36ced5dc98dfc0cd34b7b"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -250,6 +250,15 @@ search_for_use_after_instr(nir_instr *start, nir_ssa_def *def)
|
|||
return true;
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
/* If uses are considered to be in the block immediately preceding the if
|
||||
* so we need to also check the following if condition, if any.
|
||||
*/
|
||||
nir_if *following_if = nir_block_get_following_if(start->block);
|
||||
if (following_if && following_if->condition.is_ssa &&
|
||||
following_if->condition.ssa == def)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue