mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 23:20:33 +01:00
nir: Allocate predecessor and dominance frontier sets from block itself.
These sets are part of the block, and their lifetime needs to match the block itself. So, allocate them using the block itself as the context. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
131444e1c5
commit
7380c641b1
1 changed files with 2 additions and 2 deletions
|
|
@ -285,10 +285,10 @@ nir_block_create(void *mem_ctx)
|
|||
cf_init(&block->cf_node, nir_cf_node_block);
|
||||
|
||||
block->successors[0] = block->successors[1] = NULL;
|
||||
block->predecessors = _mesa_set_create(mem_ctx, _mesa_hash_pointer,
|
||||
block->predecessors = _mesa_set_create(block, _mesa_hash_pointer,
|
||||
_mesa_key_pointer_equal);
|
||||
block->imm_dom = NULL;
|
||||
block->dom_frontier = _mesa_set_create(mem_ctx, _mesa_hash_pointer,
|
||||
block->dom_frontier = _mesa_set_create(block, _mesa_hash_pointer,
|
||||
_mesa_key_pointer_equal);
|
||||
|
||||
exec_list_make_empty(&block->instr_list);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue