Open zmodem opened 4 years ago
I can confirm that your understanding is correct according to the discussions in https://discourse.llvm.org/t/profile-guided-optimization-pgo-related-questions-and-suggestions/75232 and https://discourse.llvm.org/t/status-of-ir-vs-frontend-pgo-fprofile-generate-vs-fprofile-instr-generate/58323
Extended Description
Clang's user manual currently recommends -fprofile-instr-generate for instrumentation based profile-guided optimization (https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation)
Towards the end of that section, there is a part about -fprofile-generate saying it's an alternative instrumentation method.
However, my understanding is that -fprofile-generate is really better for PGO (it supports value profiling for example), and -fprofile-instr-generate is best left for code coverage analysis.
If my understand is correct, can we update the docs to reflect this?