Enables optimal reordering of functions and variables by the linker.
This option instructs the compiler to place functions and/or data variables into separate section fragments, which enables the linker, using directions in a mapfile specified by the linker’s -M option, to reorder these sections to optimize program performance. Generally, this optimization is only effective when page fault time constitutes a significant fraction of program run time.
Reording of variables can help solve the following problems which negatively impact run-time performance:
Cache and page contention caused by unrelated variables that are near each other in memory.
Unnecessarily large work-set size as a result of related variables which are not near each other in memory.
Unnecessarily large work-set size as a result of unused copies of weak variables that decrease the effective data density.
Reordering variables and functions for optimal performance requires the following operations:
Compiling and linking with -xF.
Following the instructions in the "Program Performance Analysis" Tools manual regarding how to generate a mapfile for functions or following the instructions in the "Linker and Libraries Guide" regarding how to generate a mapfile for data.
Relinking with the new mapfile by using the linker’s -M option.
Re-executing under the Analyzer to verify improvement.
v can be one or more of the following:
Table B–23 The -xF Values
Value |
Meaning |
---|---|
[no%]func |
[Do not] fragment functions into separate sections. |
[no%]gbldata |
[Do not] fragment global data (variables with external linkage) into separate sections. |
[no%]lcldata |
[Do not] fragment local data (variables with internal linkage) into separate sections. |
%all |
Fragment functions, global data, and local data. |
%none |
Fragment nothing. |
If you do not specify -xF, the default is -xF=%none. If you specify -xF without any arguments, the default is -xF=%none,func.
Using -xF=lcldata inhibits some address calculation optimizations, so you should only use this flag when it is experimentally justified.
analyzer(1), debugger(1), ld(1) man pages.