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: [lno] Avoid use of rewrite_ssa_into_ssa in loop header copying



On Jul 17, 2004, at 5:44 PM, Zdenek Dvorak wrote:


Hello,

although usage of rewrite_ssa_into_ssa for loop header copying is quite
simple and elegant, there is one important flaw -- rewrite_ssa_into_ssa
is currently not effective enough to be usable as a subroutine inside
the optimization (i.e. it is fine to run it once or twice per function,
but running it once for each loop in function would not work). Since
I need to use loop header copying as a subroutine, I have implemented the
transformation directly.


There is a small drawback in comparison with the rewrite_ssa_into_ssa
approach -- the produced ssa form is not minimal, since we create
new phi node for each ssa name defined in the header (not just for those
used outside the header). To avoid this, we would need to scan whole
body of the loop for uses, which seems unnecesarily compile time consuming to
me. Andrew, how far are you with your immediate uses patch? This would
be one of the places where it would be really nice to have it.


The patch partially duplicates the functionality I have previously
written in tree-ssa-loop-manip.c.  I consider some of the approaches
I used in this patch a bit more clean, and plan to rewrite the
tree-ssa-loop-manip.c functions to use them.

I needed to disable the PRE pass, since the patch exposes some bug in it
(Steven is working on fixing the problem).


I almost think this is a bug in your code rather than PRE.

Andrew


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