mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Introduce a helper to express block domination.
This commit is contained in:
parent
c3657c4799
commit
de15f55477
Notes:
Alexandre Julliard
2024-03-07 23:22:05 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/662
@ -3118,6 +3118,11 @@ static void vsir_cfg_cleanup(struct vsir_cfg *cfg)
|
||||
vkd3d_string_buffer_cleanup(&cfg->debug_buffer);
|
||||
}
|
||||
|
||||
static bool vsir_block_dominates(struct vsir_block *b1, struct vsir_block *b2)
|
||||
{
|
||||
return bitmap_is_set(b1->dominates, b2->label - 1);
|
||||
}
|
||||
|
||||
static enum vkd3d_result vsir_cfg_add_edge(struct vsir_cfg *cfg, struct vsir_block *block,
|
||||
struct vkd3d_shader_src_param *successor_param)
|
||||
{
|
||||
@ -3320,7 +3325,7 @@ static void vsir_cfg_compute_dominators(struct vsir_cfg *cfg)
|
||||
if (block2->label == 0)
|
||||
continue;
|
||||
|
||||
if (bitmap_is_set(block->dominates, j))
|
||||
if (vsir_block_dominates(block, block2))
|
||||
vkd3d_string_buffer_printf(&cfg->debug_buffer, " %u", block2->label);
|
||||
}
|
||||
TRACE("%s\n", cfg->debug_buffer.buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user