Optimization Command-Line Options. NXP CodeWarrior Development Studio
広告
広告
Optimization Command-Line Options
The options for keyword are: on
Generate AltiVec vectors and related instructions.
off
Do not generate AltiVec vectors and related instructions.
vrsave
Generate AltiVec vectors and instructions that use
VRSAVE
prologue and epilogue code.
novrsave
Do not use
VRSAVE
code. This option is the default.
11.6.32 -vle
Controls the use of the Variable Length Encoded (VLE) instruction set.
Syntax
-vle
Remarks
This option tells the compiler and linker to generate and lay out Variable Length Encoded
(VLE) instructions, available on Zen variants of Power Architecture processors. VLE instructions give extra flexibility in instruction encoding and alignment, allowing the compiler and linker to greatly reduce the size of runtime object code with only a small penalty in execution performance.
This option also turns on the
-processor Zen
option.
11.7 Optimization Command-Line Options
This chapter explains the following command-line options:
•
•
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
150 Freescale Semiconductor, Inc.
Chapter 11 Command-Line for Power Architecture Processors
•
•
•
11.7.1 -code_merging
Removes duplicated functions to reduce object code size.
Syntax
-code_merging keyword[,...]
The choices for keyword are: all
Use the all
argument to specify that the linker should remove all duplicate functions except one.
safe
Use the safe
argument to specify that only duplicate functions marked as weak should be reduced to one function.
aggressive
Use the aggressive
option to specify that the linker should ignore references to function addresses when considering which duplicate functions to remove.
off
Use the off
argument to disable code merging optimization.
Remarks
This linker optimization removes duplicate copies of functions with identical executable code.
The linker does not apply this optimization to functions that have been declared with the
__declspec(no_linker_opts)
directive.
By default the code merging optimization is off.
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
151
Optimization Command-Line Options
11.7.2 -far_near_addressing
Simplifies address computations to reduce object code size and improve performance.
Syntax
-far_near_addressing
-nofar_near_addressing
Remarks
This linker optimization simplifies address computations in object code. If an address value is within the range that can be stored in the immediate field of the load immediate instruction, the linker replaces the address's two-instruction computation with a single instruction. An address value that is outside this range still requires two instructions to compute.
The ranges of values that may be stored in the immediate field is
-0x7fff
to
0x8000
for the regular li
instruction and
-0x7ffff
to
0x80000
for e_li
, the VLE (Variable Length
Encoding) instruction.
The linker does not apply this optimization to functions that have been declared with the
__declspec(no_linker_opts)
directive.
11.7.3 -vle_bl_opt
Replaces branch instructions to reduce object code size.
Syntax
-ble_bl_opt
-noble_bl_opt
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
152 Freescale Semiconductor, Inc.
Chapter 11 Command-Line for Power Architecture Processors
Remarks
This linker optimization replaces each 32-bit e_bl
instruction with a 16-bit se_bl instruction for a function call when the span of memory between the calling function and called function is sufficiently close.
This optimization requires that the target processor has the Variable Length Encoding
(VLE) extension.
The linker does not apply this optimization to functions that have been declared with the
__declspec(no_linker_opts)
directive.
11.7.4 -vle_enhance_merging
Removes duplicated functions that are called by functions that use VLE instructions to reduce object code size.
Syntax
-vle_enhance_merging
-novle_enhance_merging
Remarks
When applying the code merging optimization (
-code_merging
), this linker optimization ensures that function calls that use VLE (Variable Length Encoding) instructions will still be able to reach a function that has been removed. This optimization replaces the 16-bit se_bl
instruction with a 32-bit e_bl
instruction.
When this option is not used, the linker does not merge functions that are called by functions that use VLE instructions.
This optimization requires that the target processor has the Variable Length Encoding
(VLE) extension. This optimization has no effect when the linker is not applying the code merging optimization.
The linker does not apply this optimization to functions that have been declared with the
__declspec(no_linker_opts)
directive.
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
Freescale Semiconductor, Inc.
153
Optimization Command-Line Options
11.7.5 -volatileasm
Controls whether or not inline assembly statements will be optimized.
Syntax
-volatileasm
-novolatileasm
CodeWarrior Development Studio for Power Architecture Processors Build Tools Reference Manual, Rev.
10.6, 02/2014
154 Freescale Semiconductor, Inc.
ダウンロード
広告