[PATCH] D62707: [AMDGPU] Use InliningThresholdMultiplier for inline hint

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 15:44:53 PDT 2019


rampitec added a comment.

In D62707#1524219 <https://reviews.llvm.org/D62707#1524219>, @arsenm wrote:

> Needs test. I'm also not sure I follow how getInliningThresholdMultiplier is used. It looks like it's applied after any of the thresholds are computed in CallAnalyzer::updateThreshold?
>
> Also why do we actually override getInlineThreshold? The alloca object check seems like it shouldn't really be fundamentally different than the SROA checks the default InlineCost does


I can add test, but it essentially will be a quite large function.
Yes, multiplier is applied in the CallAnalyzer::updateThreshold(), which applies to a normal threshold. But here we handle it ourselves, so need to update.
The primary reason to override getInlineCost() is to handle alloca arguments, but it also handles wrapper calls and used to limit inlining based on the number of blocks.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62707/new/

https://reviews.llvm.org/D62707





More information about the llvm-commits mailing list