[fix] PR39300: make PRE not disturb vectorizer

Richard Guenther richard.guenther@gmail.com
Wed Jul 22 09:51:00 GMT 2009


On Tue, Jul 21, 2009 at 6:40 PM, Sebastian Pop<sebpop@gmail.com> wrote:
> Hi,
>
> On Tue, Jul 21, 2009 at 04:20, Richard
> Guenther<richard.guenther@gmail.com> wrote:
>> IMHO the performance numbers speak for themselves.  Can you
>> re-check with the above change (and also throw it onto the C++
>> tester once) and add a vectorization testcase as HJ suggests?
>>
>> Ok with that changes.
>
> Michael, could you also check whether your patch fixes or not the
> following PR: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31756
> This PR has a reduced Fortran testcase.
>
> Could you also please look at
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33244
> that has again a PRE vs. vectorization problem and some performance
> bonus linked to it ;-)
>
> Now a question to Richi:
> could you look again to the solution that I proposed for
> "DOM and VRP creating harder to optimize code"
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23821
> that looks similar to the approach that Michael took to prevent PRE
> to mess up with simple_iv's?
> See the patch and your review:
> http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00518.html
> http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00534.html

I still think this is the wrong place (or rather the substitution code
should be completely re-written and instead of substituting into
uses we should substitute the rhs of the definitions - this of course
leaves us with copy-propagation opportunities which is exactly
where we would have this logic.  It also would solve the un-CSEing
of constants we do during CCP and VRP which pessimizes some
embedded targets.  It also would allow us to more conveniently
look at type compatibility during substitution and thus would
allow us to more aggressively track equivalences during SSA
propagation).

Well.  It's on my (rather large) TODO list ...

Richard.

> Thanks,
> Sebastian
>



More information about the Gcc-patches mailing list