-fglobal-function-ordering
Purpose
Enables global binary layout optimization without utilizing Link Time Optimization (LTO). This is achieved by generating a linker symbol order file for functions that have profile data generated from Profile Guided Optimization (PGO).
Note: The option is available starting from IBM® Open XL C/C++ for AIX®
17.1.2.6.
Syntax
Defaults
-fglobal-function-ordering is disabled.
Usage
When the -fglobal-function-ordering option is specified at the compiler step,
the compiler embeds the function profile data in the generated XCOFF object files. Subsequently,
during the link step, the driver invokes a tool to preprocess these XCOFF object files and generate
a linker symbol order file. Finally, the XCOFF object files and the order file are passed to the
linker. By default, the order file has the same name as the output program concatenated with
.funcs.ordering. To override the default name of the order file, specify the
-fsave-function-order-file=/path/to/orderfile
option.Note: -fglobal-function-ordering takes effects only when used together
with -ffunction-sections.
