Download TMS320C55x Optimizing C/C++ Compiler User's Guide
Transcript
Using the Optimizer - –o2 Performs all –o1 optimizations, plus: J J J J Performs loop optimizations Eliminates global common subexpressions Eliminates global unused assignments Performs loop unrolling The optimizer uses –o2 as the default if you use –o without an optimization level. - –o3 Performs all –o2 optimizations, plus: J J J J Removes all functions that are never called Simplifies functions with return values that are never used Inlines calls to small functions Reorders function declarations so that the attributes of called functions are known when the caller is optimized J Identifies file-level variable characteristics If you use –o3, see subsection 3.2, Using the –o3 Option, on page 3-4 for more information. The levels of optimization described above are performed by the stand-alone optimization pass. The code generator performs several additional optimizations, particularly processor-specific optimizations; it does so regardless of whether you invoke the optimizer. These optimizations are always enabled and are not affected by the optimization level you choose. Optimizing Your Code 3-3