This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] reaching def. question
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: law at redhat dot com
- Cc: Diego Novillo <dnovillo at redhat dot com>,Devang Patel <dpatel at apple dot com>,"gcc at gcc dot gnu dot org list" <gcc at gcc dot gnu dot org>
- Date: Wed, 17 Mar 2004 08:21:15 +0100
- Subject: Re: [tree-ssa] reaching def. question
- References: <200403170027.i2H0RtZU001850@speedy.slc.redhat.com>
Hello,
> >On Tue, 2004-03-16 at 18:42, law@redhat.com wrote:
> >
> >> It seems to me that to do that he must first take the affected variables
> >> out of SSA form. Otherwise how does the renamer know which instance of
> >> "a" ought to be used?
> >>
> >If you mark a _DECL to be renamed, the renamer itself strips the
> >SSA_NAME wrappers.
> Which is not a safe thing to do if you've done things like copy propagation
> since you can have overlapping lifetimes.
>
> You also have to be damn careful about marking something to be rewritten
> which is used in a mixed PHI node. ie
>
> a_3 = PHI (a_2, b_1)
>
> Marking just a or b to be written is a recipe for disaster.
>
>
> > Or you mean *really* taking the variable out of SSA form?
> If you've done things like copy propagation and the like, then yes, you
> really need to take it out of SSA form.
I have thought about this issue for some time -- would not it be better
to do ssa rewriting over ssa names, thus not requiring the rewrite out
of ssa? I.e. to allow the ssa name temporarily have several definitions,
and do rewriting just over them? It might be faster. It also would not
need to do rewriting out of ssa, which may require you to insert new
assignments that must be later optimized out. It would also allow you
not to lose ssa name tags in the process.
Zdenek