[PATCH] D22120: Move inline threshold related flags to InlineSimple.cpp
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 14:16:05 PDT 2016
eraman added inline comments.
================
Comment at: include/llvm/Analysis/InlineCost.h:114
@@ +113,3 @@
+/// options.
+struct InlineKnobs {
+ int HintThreshold;
----------------
davidxl wrote:
> I don't quite like the name 'Knobs'. Perhaps more plain "Parameters"?
Ok, will rename this.
================
Comment at: lib/Transforms/IPO/InlineSimple.cpp:138
@@ +137,3 @@
+ // Explicitly specified -inline-threshold overrides Threshold.
+ return new SimpleInliner(DefaultInlineThreshold.getNumOccurrences() > 0
+ ? DefaultInlineThreshold
----------------
davidxl wrote:
> Why? If Threshold is explicitly passed in, should it be honored with highest precedence?
This is the current behavior : see the code in updateThreshold. It also makes sense. If the tool user sees a flag and explicitly passes a value to it, they expect the value to take effect. Even if you disagree with this, that should be a separate change.
https://reviews.llvm.org/D22120
More information about the llvm-commits
mailing list