I'm developing a performance critical application for Intel Atom processor.
What are the best gcc optimization flags for this CPU?
In contrast to -mtune= cpu-type , which merely tunes the generated code for the specified cpu-type , -march= cpu-type allows GCC to generate code that may not run at all on processors other than the one indicated. Specifying -march= cpu-type implies -mtune= cpu-type , except where noted otherwise.
The compiler optimizes to reduce the size of the binary instead of execution speed. If you do not specify an optimization option, gcc attempts to reduce the compilation time and to make debugging always yield the result expected from reading the source code.
GCC has a range of optimization levels, plus individual options to enable or disable particular optimizations. The overall compiler optimization level is controlled by the command line option -On, where n is the required optimization level, as follows: -O0 . (default).
With most C/C++ compilers, there's a flag passable to the compiler, -march=native , which tells the compiler to tune generated code for the micro-architecture and ISA extensions of the host CPU.
GCC 4.5 will contain the -march=atom and -mtune=atom options.
Source: http://gcc.gnu.org/gcc-4.5/changes.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With