This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question re: SSA Aggressive Dead Code Elimination
- To: Daniel Berlin <dan at www dot cgsoftware dot com>
- Subject: Re: Question re: SSA Aggressive Dead Code Elimination
- From: law at redhat dot com
- Date: Wed, 27 Jun 2001 09:03:33 -0700
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <Pine.LNX.4.33.0106270850540.20994-100000@www.cgsoftware.com>you w
rite:
> > Oh, and BTW, the reason you are running into this problem is that
> > you've changed the dominance frontier (by removing 0 as a dominator of
> > 1) , and thus, changed the IDF, and thus, eliminated the need for a
> > phi node there.
> > I think, anyway.
> >
> > So it's not really valid SSA until you do something about the PHI node.
>
> Of course, What I mean is that it's not a valid transformation to make.
> Which you already knew.
Actually, the transformation appears valid to me, given that we do not update
the DFs.
> It's obviously still valid SSA, just with a needless phi node.
Right.
> In fact, my suggestion would be to attempt to remove the now useless phi
> node, which should also solve the problem.
Actually, removing PHI, while conceptually good is actually bad in GCC as
it can set up a situation where PHI nodes are not consecutive at the start
of a basic block. That's bad. That's very very bad. If you do this, you'll
lose badly when you convert back to normal form. Been there, done that.
Long term we should have a single node at the start of the block with
*all* the PHIs for the block. But that's further off.
jeff