Friday, May 27, 2011

gcc partial optimization

I missed that and so far thought this is hardly possible, but, for your note, 
you can set per-function optimization levels with Function Specific Option Pragmas

For example:

#pragma GCC push_options
#pragma GCC optimize ("O2") 
   code
#pragma GCC pop_options
 
OTOH, of course, you can split the source code into several files and compile 
each with specific optimization options. Anyway.

No comments:

Post a Comment