gcc compile for code size
Andrew Haley
aph@redhat.com
Sun Nov 11 19:54:00 GMT 2012
On 11/11/2012 07:47 PM, Xin Tong wrote:
> when gcc is set to compile for minimal code size, what kind of
> optimizations does gcc apply in comparison to compile for performance
> ? or it is just gcc spends more time doing the compilation, selecting
> instruction sequences that are optimal for code size.
No. GCC does all optimizations *except* those known to increase
program size. This usually works pretty well, but isn't perfect.
Andrew.
More information about the Gcc-help
mailing list