[Mesa-dev] [PATCH 091/133] nir: Add a pass to lower local variable accesses to SSA values

Jason Ekstrand jason at jlekstrand.net
Wed Jan 14 14:02:55 PST 2015


On Fri, Jan 9, 2015 at 10:58 AM, Connor Abbott <cwabbott0 at gmail.com> wrote:

> On Sun, Jan 4, 2015 at 4:01 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> [...]
> >> static bool
> >> deref_may_be_aliased(nir_deref_var *deref,
> >>                      struct lower_variables_state *state)
> >> {
> >>    nir_deref_var var_deref = *deref;
> >>    var_deref.deref.child = NULL;
> >>    struct deref_node *node = get_deref_node(&var_deref, false, state);
> >
> > We're only looking for the root node corresponding to the variable, and
> > we've already populated the deref_var_nodes table, so we can just look
> it up
> > here.
> >
>
> I think you missed this, since the code is still the same and you
> never responded... it seems strange to me to call this complicated
> function (get_deref_node()) when all you want to do is look up
> something in a hash table.
>

I did that so that we keep all the lookup code for deref nodes in one
place.  Also, it ensures that the node gets create if it isn't already.
That said, it should be already so that shouldn't matter.  In any case, I
just sent a cleanup patch that should fix it for you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150114/ccefa163/attachment.html>


More information about the mesa-dev mailing list