Object level profile-directed feedback
About this task
In addition to optimizing entire executables, profile-directed feedback (PDF) can also be applied to specific object files. This approach can be an advantage in applications where patches or updates are distributed as object files or libraries rather than as executables. Also, specific areas of functionality in your application can be optimized without the process of relinking the entire application. In large applications, you can save the time and trouble that otherwise need to be spent relinking the application.
The process for using object level PDF is essentially the same as the executable level PDF process but with a small change to the PDF2 step. For object level PDF, compile your program by using the -qpdf1 option, run the resulting application with representative data, compile the program again with the -qpdf2 option. You need to specify -qnoipa with -qpdf2, which means you cannot use interprocedural analysis (IPA) optimizations and object level PDF at the same time.
- In the PDF1 step, specify -qpdf1=defname to revert the PDF file name to ._pdf. Thus, the compiler looks for ._pdf in the PDF2 step.
- In the PDF2 step, specify -qpdf2=pdfname=file_path, where file_path is the path and name of the generated PDF file.


