This is the mail archive of the 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: Analyzing Optimization: What's New in 3.4?

On Monday, Aug 11, 2003, at 16:16 US/Eastern, Scott Robert Ladd wrote:

I've just run some analyses of C and C++ optimization in gcc 3.4 (20030806). Given my use of a 3.4 snapshot, I added the -funit-at-a-time option to my analysis. Before presenting my results, I hope to receive answers to a couple of questions.

What else is new in 3.4 that I should be aware of?

A new loop unroller (enabled by the old flag).
A new basic block reorder (enabled also by the old flag).
With the new loop unroller comes an option called -fpeel-loops which you might want to try.
Note: -funit-at-a-time is enabled by default at -O3 and above.

Another thing you want want to try is intermodule optimizations (only works for C code though).
To use it just run gcc with more than one file and list the output file:
gcc -c t.c t1.c -o test.o

I note that the SSA switches are still listed as "experimental"; does anyone recommend that I include those switches in my analysis or not?

No, but you can benchmark the tree-ssa branch which is replacing these options.

What about -fnew-ra, -ftracer, and other options rarely discussed (and probably unknown to most gcc users)?

-fnew-ra is a good option to benchmark (it might slow down the code though).
-ftracer is also sometimes a good option to use.

It would be quite helpful if future documentation listed the default values for the various --param switches; such values can often be difficult to discern in the source code.

Thank you in advance.

Scott Robert Ladd
Coyote Gulch Productions (
Software Invention for High-Performance Computing

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