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: [RFC] By default if-convert only basic blocks that will be vectorized (take 3)


I use
-march=core-avx2 -static -Ofast -flto -funroll-loops
with all 3 patches applied to git version I mentioned

the same is in progress for 'take 3'

On Tue, Oct 22, 2013 at 5:26 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Oct 22, 2013 at 05:16:29PM +0400, Sergey Ostanevich wrote:
>> ouch.. html got me!
>>
>> applying to the same as before
>>
>> commit 0e3dfadd374c3045a926afa6d06af276cee2108d
>> Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
>> Date:   Fri Oct 18 08:36:28 2013 +0000
>>
>> trying '06 build.
>>
>>
>> for take 2 on HSW there were mixed results for passed tests:
>>
>> 400.perlbench     +0.25%
>> 401.bzip2         -0.40%
>> 429.mcf           -1.67%
>> 456.hmmer         +0%
>> 458.sjeng         -1.65%
>> 471.omnetpp       -1.72%
>> 483.xalancbmk     -0.25%
>> 410.bwaves        +0%
>> 433.milc          -0.28%
>> 444.namd          -1.13%
>> 450.soplex        -1.01%
>> 459.GemsFDTD      -0.25%
>> 470.lbm           +1.44%
>> 482.sphinx3       +0.61%
>
> Thanks.
>
> If this is with AVX or AVX2, there can be multiple things.
>
> One is whether if-conversion in it's current form is really so harmful
> for generated code quality (we have various testcases where what we get with
> it is very bad, but perhaps there are still testcases where it improves
> non-vectorized loops), another one is when the masked loads/stores/gather is
> actually beneficial and whether we don't want some better tuning for it.
> The patchset as whole does both things, so determining what is what is hard.
>
> If only the first two patches are applied and not the third, then it should
> give a picture on whether it is a win to have if-conversion done in it's
> current form only for vectorized bbs.
>
> And, if all 3 patches are applied, but the condition in tree_if_conversion:
>    if ((flag_tree_loop_vectorize || loop->force_vect)
>        && (flag_tree_loop_if_convert == -1 || any_mask_load_store)
>        && !version_loop_for_if_conversion (loop, &version_outer_loop,
>                                            any_mask_load_store))
>      goto cleanup;
> is changed into just
>   if (any_mask_load_store
>       && !version_loop_for_if_conversion (loop, &version_outer_loop, true))
>     goto cleanup;
> then if-conversion would happen as before, just in cases where previously
> we wouldn't if-convert because of conditional loads/stores, but now we
> could, those changes would be limited to vectorized loops only.
>
>         Jakub


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