Hello, Starting to use -flto and have a question. Have a medium-size program where the majority of the code runs best with -O2. However a handful of functions run _much_ better with -O3. In the non-LTO approach this is a simple matter of compiling each module with the appropriate optimization flag. With LTO, it appears the link-time optimizer works at only one level, either the explicitly chosen one or the level found in the first .o Can we use #pragma GCC push_options #pragma GCC optimize ("-O3") function() {} #pragma GCC pop_options To obtain the desired mixed-optimization with -flto? Is ok if the outcome is not perfectly the same. In our case the specific optimization that matter are loop unrolling, inlining of small functions, and bit field access optimization. Working with gcc/g++ 4.9.2 and binutils 2.24. Thanks