[PATCH] D18560: [TTI] Add getInliningThresholdMultiplier.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 14:33:26 PDT 2016


jlebar added a comment.

In http://reviews.llvm.org/D18560#387488, @eraman wrote:

> Wouldn't it be better to use an additive bonus to the threshold instead of multiplicative factor to account for expensive calls?


Not necessarily?  It seems not unreasonable that if we e.g. went from an un-multiplied inlining threshold of 10 to 100 that the adjusted threshold should also increase by 10x, rather than increase by +90.  Like, it depends on what is the intent behind the 10 --> 100 change.

Given how blunt this is, and given that it's used by exactly one target at the moment, I'm inclined not to bikeshed too hard on the exact form it takes.  Like, it would be better to rearrange all of the constants inside InlineCost to better reflect costs on the target machine.  But the discussion of exactly what form this should take would probably be much more productive at the point that what we have doesn't work for some new target.


http://reviews.llvm.org/D18560





More information about the llvm-commits mailing list