[PATCH] D22120: Move inline threshold related flags to InlineSimple.cpp

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 14:04:28 PDT 2016


davidxl added inline comments.

================
Comment at: include/llvm/Analysis/InlineCost.h:114
@@ +113,3 @@
+/// options.
+struct InlineKnobs {
+  int HintThreshold;
----------------
I don't quite like the name 'Knobs'. Perhaps more plain "Parameters"?

================
Comment at: lib/Transforms/IPO/InlineSimple.cpp:138
@@ +137,3 @@
+  // Explicitly specified -inline-threshold overrides Threshold.
+  return new SimpleInliner(DefaultInlineThreshold.getNumOccurrences() > 0
+                               ? DefaultInlineThreshold
----------------
Why? If Threshold is explicitly passed in, should it be honored with highest precedence?


https://reviews.llvm.org/D22120





More information about the llvm-commits mailing list