[tree-ssa] copy-propagation pass

Diego Novillo dnovillo@redhat.com
Mon Nov 25 15:01:00 GMT 2002


On Mon, 25 Nov 2002, Jeff Law wrote:

>  >Seems like SSA should handle this.
>  >
>  >a = y1
>  >y2 = z;
>  >if (a)   --> if (y1)
>  >  blah;
>  >
>  >Your problem comes from treating the two y's as one.
> Exactly.  And this is the precise and fundamental issue I have with
> non-rewriting SSA implementations.
> 
Diego falls on his sword  :)

Due to overwhelming peer pressure, I will be tweaking the
implementation to re-write the program into SSA form.  It's not
going to be high in my list, as this particular problem is
fixable in the current framework.  Patches are more than welcome.

Aldyh, what is the change to varray.h?  It doesn't seem
necessary.

Additionally, make_replacement() should not be replacing the
reference with a new variable.  It needs to copy the *original*
reference in the statement.  That is, your argument 'replacement'
should be another tree_ref, not a tree.  This is where the
current framework will help you.  If you try to replace 'ref'
with a reference that is dead at the point of insertion, nothing
will happen.

Could you add a FIXME note?  Other than that, it looks OK as a
first cut.


Thanks.  Diego.



More information about the Gcc-patches mailing list