This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/32358] New: Acovea finds bugs in GCC 4.3.0 and problems with default optimizations levels
- From: "rob1weld at aol dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jun 2007 16:49:29 -0000
- Subject: [Bug other/32358] New: Acovea finds bugs in GCC 4.3.0 and problems with default optimizations levels
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Acovea - Analysis of Compiler Options via Evolutionary Algorithm
http://www.coyotegulch.com/products/acovea/index.html
Acovea implements a genetic algorithm to find the "best" options for compiling
programs with the GNU Compiler Collection (GCC) compiler. It has both command
line and GTK GUI.
Acovea can determine the GCC compiler flags and options neccesary to produce a
program with:
* Fastest runtime
* Smallest size
* A specific return value
Traditional function-level profiling identifies the algorithms most influential
in a program's performance; Acovea is then applied to those algorithms to find
the compiler flags and options that generate the fastest code. Acovea is also
useful for finding pessimistic combinations of options, and for testing the
reliability of the compiler.
Acovea is best for tiny programs but can also run whole makefiles.
After running (for a long time on a tiny program) it produces output such as
this (edited):
# runacovea -config gcc43_athlon_xp_nofm.acovea -input fftbench.c 2>&1 | tee
runacovea_1_log.txt
Acovea 5.1.1 (compiled Jun 14 2007 22:58:24) - Evolving Better Software
Invented by Scott Robert Ladd (scott.ladd@coyotegulch.com)
Coyote Gulch Productions (http://www.coyotegulch.com)
test application: fftbench.c
config description: gcc 4.3.0 (20070609) Athlon-XP, no -ffast-math (version
1.0.0)
test configuration: gcc43_athlon_xp_nofm.acovea
acovea version: 5.1.1
evocosm version: 3.1.0
application version: /usr/test/bin/gcc 4.3.0
# of populations: 5
population size: 40
survival rate: 10% (4)
migration rate: 5% (2)
mutation rate: 1%
crossover rate: 100%
fitness scaling: sigma
generations to run: 20
random number seed: 3742623689
testing mode: speed
test start time: 2007 Jun 15 03:07:13
...(Lots of output)
generation 20 complete, average fitness: 3.65374
Acovea completed its analysis at 2007 Jun 15 07:51:19
Optimistic options:
-fexpensive-optimizations (1.599)
-fstrict-aliasing (3.027)
-fgcse-after-reload (1.678)
Pessimistic options:
-fno-tree-loop-optimize (-1.733)
-fipa-pta (-1.733)
-funroll-all-loops (-2.844)
-ffloat-store (-3.796)
-fbranch-target-load-optimize (-2.051)
-m96bit-long-double (-2.527)
-mfpmath=387 (-1.813)
-mfpmath=sse (-1.733)
-mfpmath=sse,387 (-3.082)
Acovea's Best-of-the-Best:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O1 -march=athlon-xp -fno-defer-pop
-fno-delayed-branch -fno-cprop-registers -fno-if-conversion2 -fno-tree-dce
-fno-tree-dse -fno-tree-sra -fno-tree-ch -fno-merge-constants
-fno-move-loop-invariants -fno-tree-loop-optimize -fno-tree-copy-prop
-fno-tree-salias -fno-tree-vect-loop-version -foptimize-sibling-calls
-fcse-follow-jumps -fgcse -fgcse-lm -fcrossjumping -fexpensive-optimizations
-foptimize-register-move -fschedule-insns2 -fsched-interblock
-fsched2-use-traces -fcaller-saves -ftree-pre -ftree-vrp -fpeephole2
-freorder-blocks -fstrict-aliasing -funit-at-a-time -falign-loops
-finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload
-fkeep-inline-functions -fgcse-sm -funsafe-loop-optimizations -fcheck-data-deps
-ftree-loop-im -fvect-cost-model -ftracer -fprefetch-loop-arrays
-freorder-blocks-and-partition -frtl-abstract-sequences -fpeel-loops
-fbranch-target-load-optimize -fno-function-cse -mieee-fp -mno-fp-ret-in-387
-mno-push-args -mno-align-stringops -mfpmath=sse -D__NO_MATH_INLINES -o
/tmp/ACOVEA92B15424 fftbench.c
Acovea's Common Options:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O1 -march=athlon-xp -fno-tree-sra
-fno-tree-salias -foptimize-sibling-calls -fcrossjumping -finline-functions
-funswitch-loops -fgcse-after-reload -frtl-abstract-sequences
-mno-fp-ret-in-387 -D__NO_MATH_INLINES -o /tmp/ACOVEA33D4CB8D fftbench.c
-O1:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O1 -march=athlon-xp -o
/tmp/ACOVEA63EB983B fftbench.c
-O2:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O2 -march=athlon-xp -o
/tmp/ACOVEA34683D10 fftbench.c
-O3:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O3 -march=athlon-xp -o
/tmp/ACOVEAD10E9653 fftbench.c
-O3 -ffast-math:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -O3 -march=athlon-xp -ffast-math -o
/tmp/ACOVEA61BFDD78 fftbench.c
-Os:
/usr/test/bin/gcc -lrt -lm -std=gnu99 -Os -march=athlon-xp -o
/tmp/ACOVEAC35D20E9 fftbench.c
A relative graph of fitnesses:
Acovea's Best-of-the-Best: *****************************
(1.7221)
Acovea's Common Options: ****************************************
(2.36385)
-O1: **************************************
(2.26057)
-O2: ********************************
(1.89104)
-O3: ********************************
(1.91373)
-O3 -ffast-math: *********************************
(1.96535)
-Os:
************************************************** (2.92533)
An "optimistic" option was used in all the "good" solutions.
A "pessimistic" option was absent from the "good" solutions.
The "Best-of-the-Best" solution may contain options that had no practical
effect on code generation; they didn't hurt, didn't help, and were simply
present. The fitness graph compares the baseline with various options.
Note that Acovea's Best-of-the-Best is better than "-O2" or "-O3" (on _my_
hardware, with this _one_ test program only). This can be used to "tune" the
"-O" options for specific processors.
Please attach Acovea application configuration files that are missing from this
page: http://www.coyotegulch.com/products/acovea/acovea-config.html
Please ONLY post GCC 4.3.0 bugs that the Acovea application finds in this
thread
and use a different thread for other versions of GCC, you can refer to here.
If the Acovea output does not show that the default "-O" options are out of
line or that there is a BUG in GCC 4.3.0 then please do not add frivolous
posts.
--
Summary: Acovea finds bugs in GCC 4.3.0 and problems with default
optimizations levels
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rob1weld at aol dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32358