summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.c
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-01-11 11:50:53 -0800
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-01-14 10:49:28 -0800
commit9fdded0cc34b4bdb87923707c05b8ceffb2f174c (patch)
treeb742e0cd4e33cd4766ed9f0b03c5c3eda2470556 /src/compiler/nir/nir.c
parentee23e8b17c77fa94320168427fb8a10a84b50e94 (diff)
src/compiler: use new hash table and set creation helpers
Replace calls to create hash tables and sets that use _mesa_hash_pointer/_mesa_key_pointer_equal with the helpers _mesa_pointer_hash_table_create() and _mesa_pointer_set_create(). Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r--src/compiler/nir/nir.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index 3345266fa69..1fc09d9c250 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -330,8 +330,7 @@ nir_block_create(nir_shader *shader)
cf_init(&block->cf_node, nir_cf_node_block);
block->successors[0] = block->successors[1] = NULL;
- block->predecessors = _mesa_set_create(block, _mesa_hash_pointer,
- _mesa_key_pointer_equal);
+ block->predecessors = _mesa_pointer_set_create(block);
block->imm_dom = NULL;
/* XXX maybe it would be worth it to defer allocation? This
* way it doesn't get allocated for shader refs that never run
@@ -341,8 +340,7 @@ nir_block_create(nir_shader *shader)
* which is later used to do state specific lowering and futher
* opt. Do any of the references not need dominance metadata?
*/
- block->dom_frontier = _mesa_set_create(block, _mesa_hash_pointer,
- _mesa_key_pointer_equal);
+ block->dom_frontier = _mesa_pointer_set_create(block);
exec_list_make_empty(&block->instr_list);