[PATCH] D15245: Use the inlinehint-threshold for hot callees.

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 11:32:51 PST 2015


davidxl added a comment.

This looks very good to me (also addressed cold attribute feedback by Justin) -- and the test cases are nice.  Ok to check in with the 'nits' fixed.  Looking forward to the FE cleanup.


================
Comment at: lib/Transforms/IPO/Inliner.cpp:316
@@ -296,1 +315,3 @@
+      (HasPGOCounts &&
+       FunctionCount >= (uint64_t)(0.3 * (double)MaxFunctionCount));
   if (InlineHint && HintThreshold > Threshold &&
----------------
I would suggest parametize 0.3 and 0.01 below, but since there is on-going work on profile summary, it is probably not necessary.

================
Comment at: test/Transforms/Inline/inline-cold-callee.ll:36
@@ +35,3 @@
+!llvm.module.flags = !{!0}
+!0 = !{i32 1, !"MaxFunctionCount", i32 100}
+!1 = !{!"function_entry_count", i64 10}
----------------
nit -- please make MaxFunctionCount larger so that the test case is more stable to future tunings.


Repository:
  rL LLVM

http://reviews.llvm.org/D15245





More information about the llvm-commits mailing list