There are several issues to take into consideration when selecting optimizations. Code can be optimized for size or for speed, and there are optimizations that could effect the size and the performance of the compiler. It is important to understand the full effects of the optimizations. For example, inlining will decrease the overhead of making function calls. However, if too many functions are called the resulting executable could be too large to run on the target platform.
Inlining also effects the ability to debug a program. Programs are optimally debugged at optimization level 0, and with no additional optimization options enabled. Users should keep in mind that optimization could result in incorrect data being displayed while debugging, and stepping through functions could also seem incorrect.
Finally, the performance of the compiler could also be negatively effected by enabling optimizations. If there are many optimizations enabled, the compile time could increase because of the extra time needed to process the optimizations.
All of these issues should be considered when selecting optimizations.