https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization is the documentation for Clang’s PGO. It doesn’t explicitly state which flags map to frontend and IR-based instrumentation.
- -fprofile-generate and -fprofile-use are for IR-based instrumentation and profile use.
- -fprofile-instr-generate and -fprofile-instr-use are for frontend-based instrumentation and profile use.
- -fprofile-sample-use is to use sparse profiles from hardware-counter-based profiles.