From 40ca129ed5aea647d103c99db926d3b2aabe4021 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 17 Dec 2014 16:53:04 -0800 Subject: 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 --- src/glsl/nir/nir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/glsl/nir/nir.c') 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(©->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(©->src, cb, state)) + nir_foreach_parallel_copy_entry(instr, entry) { + if (!visit_src(&entry->src, cb, state)) return false; } -- cgit v1.2.3