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: PR rtl-optimization/49504: Invalid optimization for Pmode != ptr_mode


On Fri, Jun 24, 2011 at 1:58 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> I just don't see how nonzero_bits1 can assume if pointers extend unsigned
>> and this is an addition or subtraction to a pointer in Pmode, all the bits
>> bove ptr_mode are known to be zero. ?We never run into it before x32
>> since x32 is the first such target.
>
> I agree that this is overly optimistical, but this was done on purpose:
> ?http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00316.html
>
> Could you evaluate the pessimization that the patch introduces (if any) for the
> generated code on x32? ?If there is none or it is negligible, the patch is OK
> if completed by the removal of the equivalent code in num_sign_bit_copies1.
> If it isn't negligible, we may need to be clever and devise something else.
>

I compared x32 glibc built with the old x32 gcc against x32 glibc built with
this patch and

http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00913.html

reverted, the new glibc is little smaller:

New:

[hjl@gnu-33 build-x86_64-linux]$ size libc.so
   text	   data	    bss	    dec	    hex	filename
1537648	  10076	  12944	1560668	 17d05c	libc.so
[hjl@gnu-33 build-x86_64-linux]$

Old:

[hjl@gnu-33 build-x86_64-linux.old]$ size libc.so
   text	   data	    bss	    dec	    hex	filename
1538968	  10076	  12944	1561988	 17d584	libc.so
[hjl@gnu-33 build-x86_64-linux.old]$

I looked at assembly codes.  The new one is better.
I will check it in.

Thanks.

-- 
H.J.


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