pr14627

Jeffrey A Law law@redhat.com
Wed Apr 13 14:27:00 GMT 2005


On Wed, 2005-04-13 at 09:13 -0400, Diego Novillo wrote:
> On Wed, Apr 13, 2005 at 08:25:32AM +0200, Steven Bosscher wrote:
> 
> > Perhaps it still is easier to just allow only SSA names as PHI
> > arguments, and look at their SSA_NAME_VALUE if you want to know
> > the value of the PHI argument.  That would make your pass
> > unnecessary.
> > 
> 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.
I bet it'll be larger than you think.  Everywhere where we do things
like try to simplify a PHI node (and you'll probably find that in 
more places than you realize) will have to be updated.

> 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.
> 
> I don't know how significant (1) and (2) may be.  My intuition
> tells me that it would not be too bad.  But I'd have to see some
> figures comparing this additional undo pass with the
> no-constants-in-phi-args approach.  If they're comparable, I'm
> all for preventing constants in PHI arguments.
I wouldn't mind seeing some data as well.  I just expect that we'll
find that we are getting value from allowing constants in PHIs.
jeff




More information about the Gcc-patches mailing list