In addition to optimizing entire executables, profile-directed feedback (PDF) can also be applied to specific objects. This 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 you needing to go through 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 standard PDF process but with a small change to the -qpdf2 step. For object level PDF, compile your application using -qpdf1, execute the application with representative data, compile the application again with -qpdf2 but now also use the -qnoipa option so that the linking step is skipped.
xlc -O3 -qpdf1=pdfname=myprofile file1.c file2.c file3.cWithout the pdfname suboption, by default the file name is ._pdf; the location of the file is the current working directory or whatever directory you have set using the PDFDIR environment variable.
For details, see -qpdf1, -qpdf2.