Produces an instrumented object file that can be used in profile-guided optimization.
IA-32, Intel® 64, IA-64 architectures
Linux and Mac OS X: | -prof-gen[=keyword] -no-prof-gen |
Windows: | /Qprof-gen[:keyword] /Qprof-gen- |
keyword |
Specifies details for the instrumented file. Possible values are:
|
-no-prof-gen or /Qprof-gen- |
Profile generation is disabled. |
This option produces an instrumented object file that can be used in profile-guided optimization. It gets the execution count of each basic block.
If you specify keyword srcpos or globdata, a static profile information file (.spi) is created. These settings may increase the time needed to do a parallel build using -prof-gen, because of contention writing the .spi file.
These options are used in phase 1 of the Profile Guided Optimizer (PGO) to instruct the compiler to produce instrumented code in your object files in preparation for instrumented execution.
None
Optimizing Applications:
Basic PGO Options
Example of Profile-Guided Optimization