Fortran User's Guide

-xcrossfile [=n]

Enable optimization and inlining across source files.

    SPARC:77

If specified, n may be 0, or 1.

Normally, the scope of the compiler's analysis is limited to each separate file on the command line. For example, -O4's automatic inlining is limited to subprograms defined and referenced within the same source file.

With -xcrossfile, the compiler analyzes all the files named on the command line as if they had been concatenated into a single source file.

-xcrossfile is only effective when used with -O4 or -O5.

Cross-file inlining creates a possible source file interdependence that would not normally be there. If any file in a set of files compiled together with -xcrossfile is changed, then all files must be recompiled to insure that the new code is properly inlined. See the discussion of inlining on "-inline=f1[,...fn]".

The default, without -xcrossfile on the command line, is -xcrossfile=0, and no cross-file optimizations are performed. To enable the first level of cross-file optimizations, specify -xcrossfile (equivalent to -xcrossfile=1).