An Evolutionary Analysis of GNU C Optimizations

S

Scott Robert Ladd

I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.

ACOVEA (Analysis of Compiler Options via Evolutionary Algorithm)
implements a genetic algorithm to find the "best" options for compiling
programs with the GNU Compiler Collection (GCC) C and C++ compilers.
"Best", in this context, is defined as those options that produce the
fastest executable program from a given source code. Acovea is a C++
framework that can be extended to test other programming languages and
non-GCC compilers.

I envision Acovea as an optimization tool, similar in purpose to
profiling. 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 testing combinations of flags for
pessimistic interactions, and for testing the reliability of the compiler.

You'll find the full article, and links for downloads, at:

http://www.coyotegulch.com/acovea/index.html

Enjoy.

...Scott
 
N

Nudge

Scott said:
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.

You could have cross-posted, you know...
 
G

Gianni Mariani

Scott said:
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.

ACOVEA (Analysis of Compiler Options via Evolutionary Algorithm)
implements a genetic algorithm to find the "best" options for compiling
programs with the GNU Compiler Collection (GCC) C and C++ compilers.
"Best", in this context, is defined as those options that produce the
fastest executable program from a given source code. Acovea is a C++
framework that can be extended to test other programming languages and
non-GCC compilers.

I envision Acovea as an optimization tool, similar in purpose to
profiling. 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 testing combinations of flags for
pessimistic interactions, and for testing the reliability of the compiler.

You'll find the full article, and links for downloads, at:

http://www.coyotegulch.com/acovea/index.html



Nit :

you write:

-finline-limits=nnn

it is:

-finline-limit=N (note the missing "s")

Unfortunately this one sometimes has huge impact on performance and
changes in meaning from release to release. In some cases inlining can
actually eliminate alot of code and when it's successful huge swaths of
code disappear. But sometimes you need to set it so high that some of
the code fails to finish compiling (gets stuck in some infinite loop) !
This is definitly a weakness with gcc.

Cool - I read about GA once - is this somthing we can bundle up as part
of a unit test - sort of a build-step in my Makefile ? That would be cool.

G
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top