================ @@ -1784,6 +1784,12 @@ defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", PosFlag<SetTrue, [], [ClangOption, CC1Option], "Emit extra debug info to make sample profile more accurate">, NegFlag<SetFalse>>; +def fprofile_generate_cold_function_coverage : Flag<["-"], "fprofile-generate-cold-function-coverage">, ---------------- wlei-llvm wrote:
Sorry if my PR description is not clear. Note that there is no use for `-fprofile-generate` and `-fprofile-instr-generate` here, so a driver flag here is to configure the instr file path and make linker to link the compiler.profile object files (just similar to `-fprofile-[instr]-generate=`). The reason for not using `-fprofile-[instr]-generate` is because those flags conflict with `-fprofile-sample-use`, see [PGOOptions](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/PGOOptions.h#L27-L43), `ProfileFile` is a shared file path which means the two flags are actually mutually exclusive. Another option is to make `-fprofile-generate` compatible with `-fprofile-samle-use`(like refactoring PGOOptions or adding another flag to configure the file path things), this seems to me they are more complicated than the current one. But I’m open to any suggestions on this. https://github.com/llvm/llvm-project/pull/109837 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits