SSA alias representation
Diego Novillo
dnovillo@google.com
Thu Feb 21 13:22:00 GMT 2008
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.
> - 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?
> - 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.
> - 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.
Diego.
More information about the Gcc
mailing list