[patch] Fix PR43464: update loop closed SSA form once copy prop is done

Kenneth Zadeck Kenneth.Zadeck@NaturalBridge.com
Wed Mar 24 04:16:00 GMT 2010


Let me try to bring some perspective back into this discussion,
because it is clear that this is getting out of hand.

There are two solutions that must be considered: a short term one and
a long term one.    

At this stage, a rewrite of a pass of the compiler is not acceptable,
so calling that rewrite_into_closed_loop_ssa form in a place
immediately after the pass that messed it up is the correct short term
solution.  And it is purely Richard's call as to how careful that
patch needs to be about checking if things get messed up.

However, I agree with Steven that this is a very poor long term
solution that should be strongly avoided.  Unswitching needs to be
more careful about the damage that it does to the representation.
Years ago, i had this same discussion with Zdenek because he basically
proposed to rebuild ssa form after every transformation.  This simply
is not a solution that scales.  It is true that the general problem of
incrementally maintaining SSA form is intractable, but the reality is
that in the context of the changes that are made by a specific
transformation, the process is generally easy.  This is, in fact, the
main reason that SSA won over dataflow analysis: you rarely have to
start over.  This should be the solution persued in the next round.

Kenny   


> On 3/22/10, Sebastian Pop <sebpop@gmail.com> wrote:
> > On Mon, Mar 22, 2010 at 04:52, Richard Guenther <rguenther@suse.de> wrote:
> >> Simply drop the gimple_num_phi_args == 1 check from the code that
> >> tries to preserve loop-closed SSA form.
> >
> > This change passed bootstrap and test on amd64-linux.
> > As I said on the PR, this change would break both h264ref
> > and gamess with -O3.  See
> > http://groups.google.com/group/gcc-graphite-test/browse_thread/thread/f5b0d912e90b598f
> >
> > And there I come back again to Steven, and reiterate:
> > instead of just adding more bugs like this, why not adding
> > as I proposed a call to rewrite_into_loop_closed_ssa
> > that would do the right thing?
> >
> > Sebastian
> >
> 
> Because your idea of "the right thing" is IMNSHO wrong.
> 
> You, and many people like you, need to come down out of your academic
> ivory tower and start thinking about the implications of your costly
> let's-add-new-passes approach to solving bugs on the usability of the
> compiler for the large majority of users who don't care one tiny bit
> about your fancy new niche LNO optimizations.
> 
> Or in short: cost-benefit is against you.
> 
> Ciao,
> Steven



More information about the Gcc-patches mailing list