[tree-ssa] copy propagation and the abstraction penalty

Joe Buck jbuck@synopsys.com
Thu May 15 22:51:00 GMT 2003


On Thu, May 15, 2003 at 03:48:29PM -0700, Joe Buck wrote:
> On Thu, May 15, 2003 at 03:17:48PM -0700, Richard Henderson wrote:
> > Indeed.  And for this case I definitely think it's the right thing to do.
> > 
> > IMO constant propagation should be able to take
> > 
> >     T.8_2 = &<UVa150>;
> >     {
> >       struct complex * const this;
> > 
> >       this_3 = (struct complex * const)T.8_2;
> >       {
> >         this->re = 1.0e+0;
> > 
> > and turn it into
> > 
> > 	(&<UVa150>)->re = 1.0e+0
> > 
> > which folds to
> > 
> > 	<UVa150>.re = 1.0e+0
> > 
> > At which point we have no aliasing problem, and a subsequent round
> > of constant propagation ought to be able to send 1.0e+0 to its 
> > destination.
> 
> That helps this case, but in many other cases the content of the temporary
> struct's field will be a variable, and we would still want to copy-propagate.

Sigh.  Sorry Richard: of course the addresses are constant; I was focusing
on the 1.0e0 constant.  As a Gilda Radner character used to say, never
mind.




More information about the Gcc mailing list