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: [PATCH] Improve out-of-SSA coalescing


On Wed, 25 Sep 2013, Richard Biener wrote:

> 
> This loosens the restriction of only coalescing SSA names with
> the same base variable by ignoring that restriction for DECL_INGORED_P
> base variables (ok, all of them can and should be anonymous SSA names
> now, but code obviously hasn't catched up 100%).
> 
> This improves the code generated for the loop in the testcase to
> 
>         <fallthru>
>         .p2align 4,,10
>         .p2align 3
> .L4:
>         xorps   %xmm1, %xmm1
>         cvtsi2ss        %eax, %xmm1
>         addl    $1, %eax
>         cmpl    %edi, %eax
>         addss   %xmm1, %xmm0
>         jne     .L4
> 
> from
> 
>         jmp     .L4
>         .p2align 4,,10
>         .p2align 3
> .L6:
>         movaps  %xmm0, %xmm1
> .L4:
>         xorps   %xmm0, %xmm0
>         cvtsi2ss        %eax, %xmm0
>         addl    $1, %eax
>         cmpl    %edi, %eax
>         addss   %xmm1, %xmm0
>         jne     .L6
> 
> avoiding the copy on the backedge and the loop entry jump.  Overall
> this is similar to what Jeff was after with his latest adjustment
> of this code.
> 
> Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu.

For some reason it miscompiles GCC itself.  Hmm.  Cannot spot the
obvious error yet.

Richard.


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