Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...
Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...
Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<str<strong>on</strong>g>Compiler</str<strong>on</strong>g> <str<strong>on</strong>g>Usage</str<strong>on</strong>g> <str<strong>on</strong>g>Guidelines</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> Plat<str<strong>on</strong>g>for</str<strong>on</strong>g>ms<br />
32035 Rev. 3.22 November 2007<br />
-xprofile=collect:[name] flag, run the program <strong>on</strong> a typical dataset. Then compile with<br />
-xprofile=use:[name] to utilize the resulting profile data to tune the program.<br />
The -xcrossfile flag enables optimizati<strong>on</strong> across all source files. This flag must be combined with<br />
-xO4 or -xO5 to be effective.<br />
The -xipo=2 flag enable interprocedural optimizati<strong>on</strong> (this opti<strong>on</strong> is preferred over -xcrossfile, which<br />
was pre-ipo).<br />
The -xprefetch and -xprefetch_level=1,2,3. causes prefetch with various metric triggers<br />
-xalias_level, which communicates that a given program is known to adhere to certain aliasing<br />
restricti<strong>on</strong>s -xvector=simd,lib which causes generati<strong>on</strong> of SIMD instructi<strong>on</strong>s <str<strong>on</strong>g>for</str<strong>on</strong>g> chips that support<br />
SIMD(all, <str<strong>on</strong>g>for</str<strong>on</strong>g> Opter<strong>on</strong>).<br />
Note: The -fast switch implies the -xO5 switch.<br />
Additi<strong>on</strong>al per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance improvements can be gained in floating point programs using the<br />
-fsimple[=n] switch. The -fsimple=2 flag enables aggressive floating point optimizati<strong>on</strong>s, but<br />
sacrifices numeric accuracy. This flag is implied by -fast.<br />
3.8 GCC <str<strong>on</strong>g>Compiler</str<strong>on</strong>g>s (32-<str<strong>on</strong>g>Bit</str<strong>on</strong>g>) <str<strong>on</strong>g>for</str<strong>on</strong>g> Linux®<br />
The 32-bit GNU <str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Collecti<strong>on</strong> (GCC) compilers can be installed and run <strong>on</strong> 32-bit Linux and<br />
<str<strong>on</strong>g>64</str<strong>on</strong>g>-bit Linux <strong>on</strong> AMD Athl<strong>on</strong> <str<strong>on</strong>g>64</str<strong>on</strong>g> and AMD Opter<strong>on</strong> processors. The GCC compilers come in a<br />
number of different varieties. This secti<strong>on</strong> discusses the following different GCC compilers:<br />
gcc 4.2.0 from Free Software Foundati<strong>on</strong> (FSF)<br />
gcc 4.2.0 compiler from SuSE Linux Enterprise Server 10<br />
gcc 4.2.0 compiler from SuSE Linux 10.1<br />
3.8.1 Recommended <str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Versi<strong>on</strong>s<br />
The Linux distributi<strong>on</strong>s from SuSE and Red Hat include a default 32-bit GCC compiler and opti<strong>on</strong>al<br />
compilers. From a per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance standpoint, the opti<strong>on</strong>al compilers are recommended. Table 5 shows<br />
the recommended (opti<strong>on</strong>al) compiler versi<strong>on</strong>s <str<strong>on</strong>g>for</str<strong>on</strong>g> the current SuSE and Red Hat distributi<strong>on</strong>s.<br />
Table 5. GCC Versi<strong>on</strong>s Included with Linux ® Distributi<strong>on</strong>s<br />
Linux® Distributi<strong>on</strong> Default GCC<br />
<str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Versi<strong>on</strong><br />
Recommended (Opti<strong>on</strong>al) <str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Versi<strong>on</strong><br />
Red Hat Enterprise<br />
3.2 gcc-ssa<br />
Linux ® 3<br />
SuSE Linux Enterprise<br />
Server 10<br />
4.1 gcc 4.2.0<br />
30 Per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance-Centric <str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Switches Chapter 3