summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_from_ssa.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-01-20 16:23:51 -0800
committerEric Anholt <[email protected]>2015-01-22 13:52:19 -0800
commit534a4ec82f09fa37e2134c994082e71c79b7d5ec (patch)
tree598ab6b45e9a47d997c7d09881a6bad54c805d45 /src/glsl/nir/nir_from_ssa.c
parentc5be9c126d6ca9380cd381a5eb22554e4bb71a64 (diff)
nir: Make an easier helper for setting up SSA defs.
Almost all instructions we nir_ssa_def_init() for are nir_dests, and you have to keep from forgetting to set is_ssa when you do. Just provide the simpler helper, instead. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_from_ssa.c')
-rw-r--r--src/glsl/nir/nir_from_ssa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
index 8b8f0f5ac75..840177bff7e 100644
--- a/src/glsl/nir/nir_from_ssa.c
+++ b/src/glsl/nir/nir_from_ssa.c
@@ -355,9 +355,8 @@ isolate_phi_nodes_block(nir_block *block, void *void_state)
entry->src = nir_src_copy(src->src, state->dead_ctx);
_mesa_set_add(src->src.ssa->uses, &pcopy->instr);
- entry->dest.is_ssa = true;
- nir_ssa_def_init(&pcopy->instr, &entry->dest.ssa,
- phi->dest.ssa.num_components, src->src.ssa->name);
+ nir_ssa_dest_init(&pcopy->instr, &entry->dest,
+ phi->dest.ssa.num_components, src->src.ssa->name);
struct set_entry *use_entry =
_mesa_set_search(src->src.ssa->uses, instr);
@@ -379,9 +378,8 @@ isolate_phi_nodes_block(nir_block *block, void *void_state)
nir_parallel_copy_entry);
exec_list_push_tail(&block_pcopy->entries, &entry->node);
- entry->dest.is_ssa = true;
- nir_ssa_def_init(&block_pcopy->instr, &entry->dest.ssa,
- phi->dest.ssa.num_components, phi->dest.ssa.name);
+ nir_ssa_dest_init(&block_pcopy->instr, &entry->dest,
+ phi->dest.ssa.num_components, phi->dest.ssa.name);
nir_ssa_def_rewrite_uses(&phi->dest.ssa,
nir_src_for_ssa(&entry->dest.ssa),
state->mem_ctx);