dxil: Use nir_foreach_phi_safe
This should be faster, since we're not iterating pointlessly over all the non-phis after the phi. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22967>
This commit is contained in:
parent
aa6bdbd54a
commit
5a0223a2d4
1 changed files with 1 additions and 5 deletions
|
|
@ -993,11 +993,7 @@ upcast_phi_impl(nir_function_impl *impl, unsigned min_bit_size)
|
|||
bool progress = false;
|
||||
|
||||
nir_foreach_block_reverse(block, impl) {
|
||||
nir_foreach_instr_safe(instr, block) {
|
||||
if (instr->type != nir_instr_type_phi)
|
||||
continue;
|
||||
|
||||
nir_phi_instr *phi = nir_instr_as_phi(instr);
|
||||
nir_foreach_phi_safe(phi, block) {
|
||||
assert(phi->dest.is_ssa);
|
||||
|
||||
if (phi->dest.ssa.bit_size == 1 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue