Compiling C/C++ Code; Compiler Options; Compiler Options To Avoid On Performance Critical Code - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Compiling C/C++ Code

3.2 Compiling C/C++ Code
3.2.1

Compiler Options

Table 3–1. Compiler Options to Avoid on Performance Critical Code
3-4
The 'C6000 compiler offers high-level language support by transforming your
C/C++ code into more efficient assembly language source code. The compiler
tools include a shell program (cl6x), which you use to compile, assembly opti-
mize, assemble, and link programs in a single step. To invoke the compiler
shell, enter:
cl6x [ options ] [ filenames ] [–z [ linker options ] [ object files ]]
For a complete description of the C/C++ compiler and the options discussed
in this chapter, see the TMS320C6000 Optimizing C/C++ Compiler User's
Guide (SPRU187) .
Options control the operation of the compiler. This section introduces you to
the recommended options for performance, optimization, and code size. Con-
siderations of optimization versus performance are also discussed.
The options described in Table 3–1 are obsolete or intended for debugging,
and could potentially decrease performance and increase code size. Avoid us-
ing these options with performance critical code.
Option
Description
–g/–s/
These options limit the amount of optimization across C state-
–ss/–gp
ments leading to larger code size and slower execution.
–mu
Disables software pipelining for debugging. Use –ms2/–ms3
instead to reduce code size which will disable software pipelin-
ing among other code size optimizations.
–o1/–o0
Always use –o2/–o3 to maximize compiler analysis and opti-
mization. Use code size flags (–ms n ) to tradeoff between per-
formance and code size.
–mz
Obsolete. On pre–3.00 tools, this option may have improved
your code, but with 3.00+ compilers, this option will decrease
performance and increase code size.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Table of Contents