This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SSA alias representation


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)

 # p = PHI <....> (NMTv4 associated to p)
 ....

This is, a name tag is constantly being versioned, isnt it?

>  > - About versioning : every name can be versioned, cannot it?
>
>
> Sorry, I don't understand the question.  SSA names have a version
>  number, yes.  Is that what you're asking?

Yes, bad formed. Sorry, it is about my english....

>  >    - when are virtual operands inserted? Do they have to be versioned
>  > at same time that real operands? For instance, # a6 = VDEF <a5>; a7 =
>  > 3;, this implies that alias computation is processed at same time that
>  > SSA Renaming?
>
>
> No, the memory SSA web is built after the first stage of alias analysis.
>   First, the program is put in register SSA form, a few passes later the
>  memory SSA UD web is built on top.
>

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?
Where could i find all the passes applied and their order?
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)"?

>  >    - Could the others names (TMT, NMT,  SFT, etc.) be versioned?
>  > (every name that is able to be part of a virtual operand could be
>  > versioned....)
>
>
> Yes.  When a pointer does not have a specific set of symbols in its
>  points-to set, its memory tag is used.
>

My bigger doubt is when are each structure computed: alias set, names
tags, UD chains.


Thanks very much!!

Fran


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]