C/C++ Compiler Language Extensions
• #pragma optimize_for_space
This pragma turns the optimizer back on, if it was disabled, or sets
focus to give reduced code size a higher priority than high perfor-
mance, where these conflict.
• #pragma optimize_for_speed
This pragma turns the optimizer back on, if it was disabled, or sets
focus to give high performance a higher priority than reduced code
size, where these conflict.
• #pragma optimize_as_cmd_line
This pragma resets the optimization settings to be those specified
on the
The following shows example uses of these pragmas.
#pragma optimize_off
void non_op() { /* non-optimized code */ }
#pragma optimize_for_space
void op_for_si() { /* code optimized for size */ }
#pragma optimize_for_speed
void op_for_sp() { /* code optimized for speed */ }
/* subsequent functions declarations optimized for speed */
Linking Control Pragmas
Linking pragmas change how a given global function or variable is viewed
during the linking stage. These pragmas are:
and
weak_entry
#pragma linkage_name identifier
The
#pragma linkage_name
nal function declaration. It ensures that identifier is used as the external
reference, instead of following the compiler's usual conventions.
1-126
command line when the compiler was invoked.
cc219x
.
associates the
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
,
linkage_name
retain_name
with the next exter-
identifier
for ADSP-219x DSPs
,
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers