Link Time Optimization (LTO)
The Link Time Optimization (LTO) feature is supported in IBM® Open XL Fortran for AIX® 17.1.0.
The LTO information generated by IBM Open XL Fortran for AIX 17.1.0 is
incompatible with the Interprocedural Analysis (IPA) information of IBM XL Fortran for AIX 16.1.0 in the
following aspects:
- The IPA information in object files that are created by IBM XL Fortran for AIX 16.1.0 or earlier releases is silently ignored by IBM Open XL Fortran for AIX 17.1.0.
- Object files that are created by IBM XL Fortran for AIX 16.1.0 or earlier releases using the -qipa=noobject option contain only IPA information, so they are unusable in IBM Open XL Fortran for AIX 17.1.0.
- Object files that are created by IBM Open XL Fortran for AIX 17.1.0 using the
-qlto option are not
readable by IBM XL Fortran for AIX 16.1.0 or earlier
releases.Note: In IBM Open XL Fortran for AIX 17.1.0, the -qlto=thin option is not supported. LTO mode can be set only to the full mode.
To compile a program with LTO, specify the
-qlto option on both the
compile and link steps:
- When -qlto is specified on the compile step, the compiler generates LLVM IR instead of object code, in preparation for LTO on the link step.
- When -qlto is
specified on the link step, the compiler adds extra linker options such as
-bplugin:<path-to-libLTO.so> when
invoking the linker. The linker can handle a mixture of native XCOFF objects and LLVM IR objects,
and then invokes the LTO optimizations on the
LLVM IR objects via the
libLTO.so
plugin.
Note: The minimum version of
libLTO.so
that is supported by the linker is
version 29.