================
@@ -1099,7 +1099,8 @@ emitCombinerOrInitializer(CodeGenModule &CGM, QualType Ty,
   auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
                                     Name, &CGM.getModule());
   CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, FnInfo);
-  Fn->addFnAttr("sample-profile-suffix-elision-policy", "selected");
+  if (!CGM.getCodeGenOpts().SampleProfileFile.empty())
----------------
shiltian wrote:

Is there a better option or flag to check whether PGO is enabled? I thought the 
enabling flag would be a combination of something like `--enable-pgo 
--sample-profile-name`.

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

Reply via email to