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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 12:27:13 PDT 2020


MaskRay added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:856
 
+  // Add use-sample-profile value.
+  if (!CGM.getCodeGenOpts().SampleProfileFile.empty())
----------------
The code self explains. I think the comment does not add much value.


================
Comment at: llvm/test/Transforms/Inline/inline-incompat-attrs.ll:23
+define i32 @caller1(i32 %y1) {
+; caller1 doesn't have use-sample-profile attribute but callee2 has,
+; so callee2 won't be inlined into caller1.
----------------
You may consider `;; ` for comments, which can make comments stand out from RUN/CHECK lines.

Perhaps you have an opinion on D79276? :)


================
Comment at: llvm/test/Transforms/SampleProfile/use-sample-profile-attr.ll:118
+!27 = !DILocation(line: 11, column: 20, scope: !7)
+
----------------
trailing empty line


Repository:
  rL LLVM

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

https://reviews.llvm.org/D79959





More information about the llvm-commits mailing list