mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
nir/opt_sink: return early when trying to sink unused instructions
Fixes: 5f6c5e5b86 ('nir: don't sink instructions into loops')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7874>
This commit is contained in:
parent
5603bb13e3
commit
e60fcf0a87
1 changed files with 4 additions and 0 deletions
|
|
@ -166,6 +166,10 @@ get_preferred_block(nir_ssa_def *def, bool sink_out_of_loops)
|
|||
lca = nir_dominance_lca(lca, use_block);
|
||||
}
|
||||
|
||||
/* return in case, we didn't find a reachable user */
|
||||
if (!lca)
|
||||
return NULL;
|
||||
|
||||
/* We don't sink any instructions into loops to avoid repeated executions
|
||||
* This might occasionally increase register pressure, but seems overall
|
||||
* the better choice.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue