[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:25:45 PDT 2016


davidxl added inline comments.

================
Comment at: lib/Transforms/IPO/InlineSimple.cpp:138
@@ +137,3 @@
+  // Explicitly specified -inline-threshold overrides Threshold.
+  return new SimpleInliner(DefaultInlineThreshold.getNumOccurrences() > 0
+                               ? DefaultInlineThreshold
----------------
eraman wrote:
> 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.
OK -- if this is intended as NFC. On the other hand how do you plan to handle fine grain control of different instances of the inliner ? (LTO, thinLTO, IRPGO)?


https://reviews.llvm.org/D22120





More information about the llvm-commits mailing list