Optimizing at level 0

Benefits at level 0

  • Provides minimal performance improvement with minimal impact on machine resources
  • Exposes some source code problems that can be helpful in the debugging process

Begin your optimization process at -O0, which the compiler already specifies by default. This level performs basic analytical optimization by removing obviously redundant code, and it can result in better compile time. It also ensures your code is algorithmically correct so you can move forward to more complex optimizations. -O0 also includes some redundant instruction elimination and constant folding. The -qfloat=nofold option can be used to suppress folding floating-point operations. Optimizing at this level accurately preserves all debugging information and can expose problems in existing code, such as uninitialized variables.

Additionally, specifying -qarch at this level targets your application for a particular machine and can significantly improve performance by ensuring that your application takes advantage of all applicable architectural benefits.
Note: For SMP programs, you need to add an additional option -qsmp=noopt.

For more information about tuning, consult Tuning for Your Target Architecture.

See -O for information about the -O level syntax.



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us