Compiler Command-Line Interface
Optimization Control
The general aim of compiler optimizations is to generate correct code that
executes fast and is small in size. Not all optimizations are suitable for
every application or possible all the time so the compiler optimizer has a
number of configurations, or optimization levels, which can be applied
when suitable. Each of these levels are enabled by one or more compiler
switches (and VisualDSP++ project options) or pragmas.
Refer Chapter 2,
Source Code"
formance from the compiler.
The following list identifies several optimization levels. The levels are
notionally ordered with least optimization listed first and most optimiza-
tion listed last. The descriptions for each level outline the optimizations
performed by the compiler and identifies any switches or pragmas
required or that have direct influence on the optimization levels
performed.
• Debug
The compiler produces debug information to ensure that the object
code matches the appropriate source code line. See
page 1-28
• Default
The compiler does not perform any optimizations by default when
none of the compiler optimizations switches are used (or enabled in
VisualDSP++ project options). Default optimizations level can be
enabled using the
• Procedural Optimizations
The compiler performs advanced, aggressive optimization on each
procedure in the file being compiled. The optimizations can be
directed to favor optimizations for speed (
factor between speed and space (
1-56
"Achieving Optimal Performance from C/C++
for information on how to obtain maximal code per-
for more information.
optimize_off
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
pragma
(on page
1-125).
) or space (
-O
). If debugging is also
-Ov
for ADSP-219x DSPs
"-g" on
) or a
-Os
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers