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


On Tue, Feb 26, 2008 at 04:44, Fran Baena <franbaena@gmail.com> wrote:

>  if ()
>   t_1 = & a_1;        t_1 points-to { a_1 }
>  else
>   if ()
>     t2_ = & b_1;      t_2 points-to { b_1 }
>   else
>     t_3 = & c_1;      t_3 points-to { c_1 }
>
>  #  t_4 = PHI <t_1, t_2, t_3>
>  p_1 = t_4;             p_1 and t_4 points-to { a_1, b_1, c_1 }

Not quite, points-to sets always have symbols, not SSA names.  Use
-fdump-tree-salias-all-vops to see how things are renamed.

Symbols with their address taken are only renamed when they appear as
virtual operands.  So, if you have:

p_3 = (i_5 > 10) ? &a : &b
a = 4

notice that 'a' is never renamed in the LHS of the assignment.  It's
renamed as a virtual operand:

p_3 = (i_5 > 10) ? &a : &b

# a_9 = VDEF <a_8>
a = 4


Diego.


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