[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 28 06:37:29 PDT 2025
================
@@ -892,6 +909,20 @@ static void generateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags,
delete tlii;
}
+
+// Default filename used for profile generation.
+namespace llvm {
+ extern llvm::cl::opt<bool> DebugInfoCorrelate;
+ extern llvm::cl::opt<InstrProfCorrelator::ProfCorrelatorKind> ProfileCorrelate;
+
+
+std::string getDefaultProfileGenName() {
----------------
fanju110 wrote:
> You can change the source of clang to move that function to e.g. `llvm/lib/Frontend/Driver/CodeGenOptions.cpp` and use it from that location from both clang and flang. We've done that in a few different places for options like these (like `createTLII` as @tarunprabhu mentioned)
Sorry, I've ported this function to the llvm namespace and forgot to remove the code here, I've now removed this code
https://github.com/llvm/llvm-project/pull/136098
More information about the cfe-commits
mailing list