summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-12-17 16:53:04 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:23 -0800
commit40ca129ed5aea647d103c99db926d3b2aabe4021 (patch)
tree4668ac2265f1f671fc99bee8bcabdb476b27ea8a /src/glsl/nir/nir.c
parent1b720c6ed868b3f231f63568fc360fe7c4024c02 (diff)
nir: Rename parallel_copy_copy to parallel_copy_entry and add a foreach macro
parallel_copy_copy was a silly name. Also, things were getting long and annoying, so I added a foreach macro. For historical reasons, several of the original iterations over parallel copy entries in from_ssa used the _safe variants of the loop. However, all of these no longer ever remove an entry so it's ok to make them all use the normal iterator. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r--src/glsl/nir/nir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index eeed6f2aa9d..ad86a6ea945 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -474,7 +474,7 @@ nir_parallel_copy_instr_create(void *mem_ctx)
nir_parallel_copy_instr *instr = ralloc(mem_ctx, nir_parallel_copy_instr);
instr_init(&instr->instr, nir_instr_type_parallel_copy);
- exec_list_make_empty(&instr->copies);
+ exec_list_make_empty(&instr->entries);
return instr;
}
@@ -1413,8 +1413,8 @@ static bool
visit_parallel_copy_dest(nir_parallel_copy_instr *instr,
nir_foreach_dest_cb cb, void *state)
{
- foreach_list_typed(nir_parallel_copy_copy, copy, node, &instr->copies) {
- if (!cb(&copy->dest, state))
+ nir_foreach_parallel_copy_entry(instr, entry) {
+ if (!cb(&entry->dest, state))
return false;
}
@@ -1596,8 +1596,8 @@ static bool
visit_parallel_copy_src(nir_parallel_copy_instr *instr,
nir_foreach_src_cb cb, void *state)
{
- foreach_list_typed(nir_parallel_copy_copy, copy, node, &instr->copies) {
- if (!visit_src(&copy->src, cb, state))
+ nir_foreach_parallel_copy_entry(instr, entry) {
+ if (!visit_src(&entry->src, cb, state))
return false;
}