nir/from_ssa: Make additional assumptions in coalescing
At this point, everything is SSA. Also, NIR no longer allows different numbers of components on the two sides of a phi so we can just assert rather than trying to gracefully handle mismatches. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23089>
This commit is contained in:
committed by
Marge Bot
parent
36b29201fa
commit
29b2ace184
@@ -457,8 +457,9 @@ aggressive_coalesce_parallel_copy(nir_parallel_copy_instr *pcopy,
|
||||
struct from_ssa_state *state)
|
||||
{
|
||||
nir_foreach_parallel_copy_entry(entry, pcopy) {
|
||||
if (!entry->src.is_ssa)
|
||||
continue;
|
||||
assert(entry->src.is_ssa);
|
||||
assert(entry->dest.is_ssa);
|
||||
assert(entry->dest.ssa.num_components == entry->src.ssa->num_components);
|
||||
|
||||
/* Since load_const instructions are SSA only, we can't replace their
|
||||
* destinations with registers and, therefore, can't coalesce them.
|
||||
@@ -466,10 +467,6 @@ aggressive_coalesce_parallel_copy(nir_parallel_copy_instr *pcopy,
|
||||
if (entry->src.ssa->parent_instr->type == nir_instr_type_load_const)
|
||||
continue;
|
||||
|
||||
/* Don't try and coalesce these */
|
||||
if (entry->dest.ssa.num_components != entry->src.ssa->num_components)
|
||||
continue;
|
||||
|
||||
merge_node *src_node = get_merge_node(entry->src.ssa, state);
|
||||
merge_node *dest_node = get_merge_node(&entry->dest.ssa, state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user