13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPLICATION PERFORMANCE TOOLSA.1.6.1Interprocedural <strong>Optimization</strong> (IPO)You can use the /Qip (-ip in Linux <strong>and</strong> Mac OS) option to analyze your code <strong>and</strong> applyoptimizations between procedures within each source file. Use multifile IPO with/Qipo (-ipo in Linux <strong>and</strong> Mac OS) to enable the optimizations between procedures inseparate source files.A.1.6.2Profile-Guided <strong>Optimization</strong> (PGO)Creates an instrumented program from your source code <strong>and</strong> special code from thecompiler. Each time this instrumented code is executed, the compiler generates adynamic information file. When you compile a second time, the dynamic informationfiles are merged into a summary file. Using the profile information in this file, thecompiler attempts to optimize the execution of the most heavily travelled paths inthe program.Profile-guided optimization is particularly beneficial for the Pentium 4 <strong>and</strong> Intel Xeonprocessor family. It greatly enhances the optimization decisions the compiler makesregarding instruction cache utilization <strong>and</strong> memory paging. Also, because PGO usesexecution-time information to guide the optimizations, branch-prediction can besignificantly enhanced by reordering branches <strong>and</strong> basic blocks to keep the mostcommonly used paths in the microarchitecture pipeline, as well as generating theappropriate branch-hints for the processor.When you use PGO, consider the following guidelines:• Minimize the changes to your program after instrumented execution <strong>and</strong> beforefeedback compilation. During feedback compilation, the compiler ignoresdynamic information for functions modified after that information was generated.NOTEThe compiler issues a warning that the dynamic informationcorresponds to a modified function.• Repeat the instrumentation compilation if you make many changes to yoursource files after execution <strong>and</strong> before feedback compilation.For more on code optimization options, see the Intel C++ Compiler documentation.A.1.7Auto-Generation of Vectorized CodeThis section covers several high-level language examples that programmers canuse Intel Compiler to generate vectorized code automatically.A-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!