[PATCH] Improve out-of-SSA coalescing

Richard Biener rguenther@suse.de
Wed Sep 25 13:29:00 GMT 2013


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.



More information about the Gcc-patches mailing list