This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pr14627
On Wed, Apr 13, 2005 at 03:27:41PM +0200, Steven Bosscher wrote:
> On Wednesday 13 April 2005 15:13, Diego Novillo wrote:
> > Disallowing constants in PHI arguments would certainly make life
> > a tiny bit easier on the optimizers. I can't see any drawbacks
> > from an optimization POV, because we'd have the value in
> > SSA_NAME_VALUE.
> >
> > However, we'd probably (1) see increased memory consumption by
> > all the additional 'NAME = CST' assignments in the IL, and (2)
> > compile times may go up.
>
> In exchange for (2), you get rid of the time you spend in uncprop
> now. And uncprop may not catch all the cases that it should get
> (it's a dominator tree pass so it can't look through PHIs, but
> ccp/vrp may still propagate constants through PHIs), so you may
> get better code also.
>
Yes. Plus, the very fact that we need a pass to *undo*
optimizations means that we have a design wart somewhere. It's
not like constants in PHI arguments are a fundamental design
block or concept.
Diego.