summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.c
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-07-21 19:54:16 -0700
committerKenneth Graunke <[email protected]>2015-08-24 13:31:41 -0700
commit9d5944053ca7bed58b299211fe8028274d480b5b (patch)
tree3177510778bdcfb83756cf2ea9d67ab0b5d64f57 /src/glsl/nir/nir.c
parentc7df141c71c3fa0bdbcf6d0bbd4b8158a35c7f5a (diff)
nir: inline block_add_pred() a few places
It was being used to initialize function impls and loops, even though it's really a control flow modification helper. It's pretty trivial, so just inline it to avoid the dependency. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r--src/glsl/nir/nir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index 60fdac5920d..b8a9e985088 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -267,8 +267,7 @@ nir_function_impl_create(nir_function_overload *overload)
exec_list_push_tail(&impl->body, &start_block->cf_node.node);
start_block->successors[0] = end_block;
- block_add_pred(end_block, start_block);
-
+ _mesa_set_add(end_block->predecessors, start_block);
return impl;
}
@@ -334,7 +333,7 @@ nir_loop_create(void *mem_ctx)
body->cf_node.parent = &loop->cf_node;
body->successors[0] = body;
- block_add_pred(body, body);
+ _mesa_set_add(body->predecessors, body);
return loop;
}