This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA question
- From: law at redhat dot com
- To: Chris Lattner <sabre at nondot dot org>
- Cc: gcc at gnu dot org
- Date: Thu, 14 Mar 2002 10:47:05 -0700
- Subject: Re: SSA question
- Reply-to: law at redhat dot com
In message <Pine.LNX.4.30.0203141113310.6072-100000@nondot.org>, Chris
Lattner
writes:
> I'm wondering why the first set gets generated to refer to its own value
> (it seems that PHI nodes should be the only insn's that should do that).
> The instruction coming into SSA constructure looks like this [which is
> identical to the above insn]:
Because insn 13 is the only definition site for reg 107. During the
renaming process we avoid renaming the first definition site as it
isn't necessary.
> It seems the the renaming code is not assuming that there is an incoming
> definition of reg 107, so no renaming has to occur.
In effect, yes. There is no prior definition of reg107 that reaches insn
13. So no renaming is needed.
> Is this desirable behavior?
It's marginally interesting. Though it may not play well with GVN/GCM
schemes such as from Click's paper in PLDI 95.
> Would it be better to mark undefined incoming
> values as being used already so that they are renamed and distinct?
There's little value in marking it undefined as it's obviously undefined
when you look at the SSA graph.
What are you really trying to accomplish?
jeff