================ @@ -148,6 +148,55 @@ class CodeGenOptions : public CodeGenOptionsBase { /// OpenMP is enabled. using DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind; + enum ProfileInstrKind { + ProfileNone, // Profile instrumentation is turned off. + ProfileClangInstr, // Clang instrumentation to generate execution counts + // to use with PGO. + ProfileIRInstr, // IR level PGO instrumentation in LLVM. + ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM. + }; + + + /// Name of the profile file to use as output for -fprofile-instr-generate, + /// -fprofile-generate, and -fcs-profile-generate. + std::string InstrProfileOutput; + + /// Name of the profile file to use as input for -fmemory-profile-use. + std::string MemoryProfileUsePath; + + unsigned int DebugInfoForProfiling; + + unsigned int AtomicProfileUpdate; ---------------- fanju110 wrote:
Thanks for the review. clang uses DebugInfoForProfiling and AtomicProfileUpdate when initializing PGOOptions. in flang, I refer to clang's writing style and add these two parameters. If don't consider these two parameters for now, I can remove them and replace the corresponding parameters with false when initializing PGOOptions. https://github.com/llvm/llvm-project/pull/136098 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits