gcc 3.4.4 optimization problem (was Re: Negative stats from rsync with 20050610 snapshot)
Sun Jun 12 11:14:00 GMT 2005
On Jun 12 11:22, Gerrit P. Haase wrote:
> Corinna Vinschen wrote:
> >I'm wondering if we should do that or not. I'm not a gcc person, so I'm
> >not exactly the right one to make such a decision. It's just interesting
> >that the strict-aliasing problem Chris found, is no problem in gcc 4
> >anymore, apparently.
> I just turn off defaulting to unit-at-a-time when you specify -O2.
> You may always specify -funit-at-a-time to see if code compiles ok
> with this flag.
> According to the introduction of the 3.4.4 optimization docs, this
> flag is optional anyway:
> "Using the -funit-at-a-time flag will allow the compiler to consider
> information gained from later functions in the file when compiling a
> function. Compiling multiple files at once to a single output file
> (and using -funit-at-a-time) will allow the compiler to use
> information gained from all of the files when compiling each of
> Where in 4.0.0 is explictly stated even in the introduction that it is
> defaulty for -O2 and above:
> "The compiler performs optimization based on the knowledge it has of the
> program. Optimization levels -O2 and above, in particular, enable
> unit-at-a-time mode, which allows the compiler to consider information
> gained from later functions in the file when compiling a function.
> Compiling multiple files at once to a single output file in
> unit-at-a-time mode allows the compiler to use information gained from
> all of the files when compiling each of them."
I see. It seems the 3.4.x code is just assuming a bit too much when
examining functions, whereas the 4.x implementation is a bit more careful.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:email@example.com
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin