This is the mail archive of the cygwin mailing list for the Cygwin 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: gcc 3.4.4 optimization problem (was Re: Negative stats from rsync with 20050610 snapshot)


On Sat, Jun 11, 2005 at 06:53:14PM +0200, Gerrit P. Haase wrote:
>Corinna Vinschen wrote:
>>Gerrit, could you please follow up on this?  It seems the simplest way is
>>to just switch off -funit-at-a-time for the -O2 optimization.  This is the
>>patch we applied internally, if that's of any help for you:
>>
>>Index: gcc/opts.c
>>===================================================================
>>RCS file: /cvs/cvsfiles/gcc/opts.c,v
>>retrieving revision 1.3
>>diff -c -3 -p -r1.3 opts.c
>>*** gcc/opts.c  16 Mar 2004 01:43:58 -0000      1.3
>>--- gcc/opts.c  23 Jul 2004 14:03:41 -0000
>>*************** decode_options (unsigned int argc, const
>>*** 564,570 ****
>>        flag_delete_null_pointer_checks = 1;
>>        flag_reorder_blocks = 1;
>>        flag_reorder_functions = 1;
>>-       flag_unit_at_a_time = 1;
>>      }
>>
>>    if (optimize >= 3)
>>--- 564,569 ----
>>
>>Otherwise, do you know by any chance, if there exists some fix for that
>>problem?  The above kludge is almost a year old, so there's a chance
>>that somebody already found the fix.
>
>Where we had a problem was with -fschedule-insns2
>(flag_schedule_insns_after_reload):
>
>On Aug 18 15:27:41, Corinna wrote:
>> Ich habe jetzt getestet und herausgefunden, dass durch simples
>> Abschalten der -fschedule-insns2 alles so funktioniert wie es soll.
>> Das gilt sowohl fuer cygserver, als auch fuer OpenSSH-3.9p1.
>
>I remember that I applied some patch for this, I think I missed it
>this time.  However, I hope this is fixed with gcc-3.4.x.
>
>Regarding unit-at-a-time I cannot remember right now if there was
>discussion, there are known issues with this option, anyway I will
>apply your kludge since I have not much time, I'm on a business trip
>the next two weeks.

I did a little more debugging on this and it seems like, in this case at
least, the problem is that the newlib code is wrong.  Compiling it with
-Wstrict-aliasing revealed a problem.  Correcting the strict aliasing problem
seems to make rsync work better.  There are also two other strict error
warnings in newlib which I'll fix.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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