================
@@ -995,7 +995,13 @@ void 
CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) {
         opts.SampleProfileFile, "", opts.ProfileRemappingFile,
         opts.MemoryProfileUsePath, llvm::PGOOptions::SampleUse,
         llvm::PGOOptions::NoCSAction, llvm::PGOOptions::ColdFuncOpt::Default,
-        opts.DebugInfoForProfiling, /*PseudoProbeForProfiling=*/false);
+        opts.DebugInfoForProfiling, opts.PseudoProbeForProfiling);
+  } else if (opts.PseudoProbeForProfiling) {
+    // -fpseudo-probe-for-profiling
+    pgoOpt = llvm::PGOOptions(
+        "", "", "", /*MemoryProfile=*/"", llvm::PGOOptions::NoAction,
+        llvm::PGOOptions::NoCSAction, llvm::PGOOptions::ColdFuncOpt::Default,
+        opts.DebugInfoForProfiling, true);
----------------
tarunprabhu wrote:

It may be good to annotate the arguments with their corresponding parameter 
names. I have done so for the last `true`. The same should be done for the 
first three empty strings that are being passed.

```suggestion
        "", "", "", /*MemoryProfile=*/"", llvm::PGOOptions::NoAction,
        llvm::PGOOptions::NoCSAction, llvm::PGOOptions::ColdFuncOpt::Default,
        opts.DebugInfoForProfiling, /*PseudoProbeForProfiling=*/true);
```

https://github.com/llvm/llvm-project/pull/205046
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to