This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] copy-propagation pass


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]