Darryl Gove's blog
x86 compiler flags
This AMD document summarises the optimisation flags available for many x86 compilers (Sun Studio, PGI, Intel etc.). It's about a year old, but it looks ok for Sun Studio. However it talks about -xcrossfile which is ancient history - use -xipo instead!
Posted at 09:18AM Oct 27, 2008 by Darryl Gove in Sun | Comments[2]



Page 30:
"The -xcrossfile flag enables optimization across all source files.
This flag must be combined with -xO4 or -xO5 to be effective.
The -xipo=2 flag enable interprocedural optimization (this option is
preferred over -xcrossfile, which was pre-ipo)."
Posted by Muncho Munchojan on October 28, 2008 at 01:10 AM PDT #
Exactly.
However, the restriction on the -xcrossfile flag is severe. All the files must be presented for compilation at the same time.
On the other hand -xipo enables you to add the option like any other compiler flag, to both the initial compile and the final link.
There's no reason to use -xcrossfile instead of -xipo. So I have long since given up even mentioning the flag.
Darryl.
Posted by Darryl Gove on October 28, 2008 at 11:02 AM PDT #