[PATCH] D60740: [InlineCost] cleanup calculations of Cost and Threshold

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 20:06:50 PDT 2019


chandlerc added inline comments.


================
Comment at: llvm/trunk/lib/Analysis/InlineCost.cpp:983-984
-  // If there is only one call of the function, and it has internal linkage,
-  // the cost of inlining it drops dramatically. It may seem odd to update
-  // Cost in updateThreshold, but the bonus depends on the logic in this method.
-  if (OnlyOneCallAndLocalLinkage)
----------------
The change doesn't say anything about how it addresses this last sentence in the comment that seems to be indicating that the decision to update cost (instead of threshold) was not made arbitrarily.

How did you verify that this doesn't in fact change the way bonuses end up being applied?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60740





More information about the llvm-commits mailing list