[Mesa-dev] [PATCH 4/4] nir: remove parent_instr from nir_register

Jason Ekstrand jason at jlekstrand.net
Thu Jun 25 13:39:25 PDT 2015


Yes, please!  It was nice at the time, but it was always a hack.

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

On Thu, Jun 25, 2015 at 12:29 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> It's no longer used
>
> Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
> ---
>  src/glsl/nir/nir.c          | 1 -
>  src/glsl/nir/nir.h          | 8 --------
>  src/glsl/nir/nir_from_ssa.c | 8 --------
>  3 files changed, 17 deletions(-)
>
> diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
> index f03e80a..f661249 100644
> --- a/src/glsl/nir/nir.c
> +++ b/src/glsl/nir/nir.c
> @@ -57,7 +57,6 @@ reg_create(void *mem_ctx, struct exec_list *list)
>  {
>     nir_register *reg = ralloc(mem_ctx, nir_register);
>
> -   reg->parent_instr = NULL;
>     list_inithead(&reg->uses);
>     list_inithead(&reg->defs);
>     list_inithead(&reg->if_uses);
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index b33c9c5..e818acc 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -389,14 +389,6 @@ typedef struct {
>      */
>     bool is_packed;
>
> -   /**
> -    * If this pointer is non-NULL then this register has exactly one
> -    * definition and that definition dominates all of its uses.  This is
> -    * set by the out-of-SSA pass so that backends can get SSA-like
> -    * information even once they have gone out of SSA.
> -    */
> -   struct nir_instr *parent_instr;
> -
>     /** set of nir_instr's where this register is used (read from) */
>     struct list_head uses;
>
> diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
> index 966c2fe..57bbdde 100644
> --- a/src/glsl/nir/nir_from_ssa.c
> +++ b/src/glsl/nir/nir_from_ssa.c
> @@ -496,14 +496,6 @@ rewrite_ssa_def(nir_ssa_def *def, void *void_state)
>        reg->name = def->name;
>        reg->num_components = def->num_components;
>        reg->num_array_elems = 0;
> -
> -      /* This register comes from an SSA definition that is defined and not
> -       * part of a phi-web.  Therefore, we know it has a single unique
> -       * definition that dominates all of its uses; we can copy the
> -       * parent_instr from the SSA def safely.
> -       */
> -      if (def->parent_instr->type != nir_instr_type_ssa_undef)
> -         reg->parent_instr = def->parent_instr;
>     }
>
>     nir_ssa_def_rewrite_uses(def, nir_src_for_reg(reg), state->mem_ctx);
> --
> 2.4.3
>
> _______________________________________________
> 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