This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA alias representation
If a name tag is associated to a ssa name, ¿when does it make sense to
version a name tag? (If it does)
2008/2/21, Diego Novillo <dnovillo@google.com>:
> On 2/21/08 1:13 PM, Fran Baena wrote:
> > 2008/2/21, Diego Novillo <dnovillo@google.com>:
> >> On 2/19/08 2:27 PM, Fran Baena wrote:
> >> > Hi everybody,
> >> >
> >> > i am studing how gcc carries out Alias Representation and some questions appear.
> >> >
> >> > For instance, given this code portion:
> >> >
> >> > if ( ... )
> >> > p = &a;
> >> > else
> >> > if ( ... )
> >> > p = &b;
> >> > else
> >> > p = &c;
> >> >
> >> > a = 5;
> >> > b = 3;
> >> > d = *p4;
> >> >
> >> > My questions are:
> >> >
> >> > - both p like *p need a Name Memory Tag structure? It is enough with only one?
> >>
> >>
> >> Pointer dereferences do not receive NMTs, only the pointers. So a name
> >> tag will be associated with the SSA name resulting from the PHI node
> >> created at the end of that if() tree.
> >
> > And this name tag is versioned too, like this:
> > if ( ... )
> > p = &a; (NMTv1 associated to p)
> > else
> > if ( ... )
> > p = &b; (NMTv2 associated to p)
> > else
> > p = &c; (NMTv3 associated to p)
> >
>
> No. None of these SSA names are dereferenced so no name tag is created
> for them. The only SSA name with a name tag will be the one produced by
> the PHI.
>
> See the output of -fdump-tree-salias-vops-blocks. That will show you
> the results of the first alias analysis run.
>
>
> > To organize temporarily the passes. Firstly alias analysis is
> > computed, it is followed by ssa form, and after that the memory ssa
> > web, aren't they?
>
>
> No. First SSA then alias analysis then the memory SSA
>
>
> > Where could i find all the passes applied and their order?
>
>
> passes.c:init_optimization_passes.
>
>
> > What is register SSA form? Is it the standard SSA form explained in
> > "Efficiently computing static single assignment form and the control
> > dependence graph (cytron91)"?
>
>
> Yes. It's the traditional rewriting form. The memory SSA web is the
> factored use-def chains by Wolfe.
>
>
> See the tutorials in http://gcc.gnu.org/wiki/GettingStarted, all this is
> described there.
>
>
>
> Diego.
>