[Mesa-dev] [PATCH 3/3] nir/from_ssa: Use the nir_block_dominance function instead of our own
Connor Abbott
cwabbott0 at gmail.com
Fri Feb 6 14:39:04 PST 2015
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
On Fri, Feb 6, 2015 at 5:12 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
> src/glsl/nir/nir_from_ssa.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
> index 2e7add3..3625237 100644
> --- a/src/glsl/nir/nir_from_ssa.c
> +++ b/src/glsl/nir/nir_from_ssa.c
> @@ -54,13 +54,8 @@ ssa_def_dominates(nir_ssa_def *a, nir_ssa_def *b)
> } else if (a->parent_instr->block == b->parent_instr->block) {
> return a->live_index <= b->live_index;
> } else {
> - nir_block *block = b->parent_instr->block;
> - while (block->imm_dom != NULL) {
> - if (block->imm_dom == a->parent_instr->block)
> - return true;
> - block = block->imm_dom;
> - }
> - return false;
> + return nir_block_dominates(a->parent_instr->block,
> + b->parent_instr->block);
> }
> }
>
> --
> 2.2.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list