SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The C/C++ compiler is able to perform various optimizations, which are performed by the optimizer and the code generator:
The optimizer performs high-level optimizations in the stand-alone optimization pass. Use higher optimization levels, such as --opt_level=2 and --opt_level=3, to achieve optimal code.
The code generator performs several additional optimizations. These are low-level, target-specific optimizations. It performs these regardless of whether you invoke the optimizer and are always enabled, though they are more effective when the optimizer is used.
The easiest way to invoke optimization is to use the compiler program, specifying the --opt_level=n option on the compiler command line. You can use -On as an alias for the --opt_level option. The n denotes the level of optimization (0, 1, 2, 3, and 4), which controls the type and degree of optimization.
For details about how the --opt_level and --opt_for_speed options and various pragmas affect inlining, see Section 2.11.
Debugging is enabled by default, and the optimization level is unaffected by the generation of debug information.