[PATCH] D79959: [SampleFDO] Add use-sample-profile function attribute

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 17 11:04:52 PST 2021


mtrofin added inline comments.
Herald added subscribers: ormris, jdoerfert.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:856
 
+  // Add use-sample-profile value.
+  if (!CGM.getCodeGenOpts().SampleProfileFile.empty())
----------------
MaskRay wrote:
> The code self explains. I think the comment does not add much value.
Could this be applied by a pass, early on in PassBuilder::buildPerModuleDefaultPipeline, if we determine we're not in ThinLTO post link? That way it would be a frontend-independent solution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79959/new/

https://reviews.llvm.org/D79959



More information about the llvm-commits mailing list