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

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 17:16:14 PDT 2019


fedor.sergeev created this revision.
fedor.sergeev added reviewers: eraman, greened, chandlerc, yrouban.
Herald added subscribers: dexonsmith, steven_wu, haicheng, javed.absar, mehdi_amini.
Herald added a project: LLVM.

Largerly NFC. Cost and Threshold are calculated somewhat differently but overall InlineResult
should stay the same, since Cost >= Threshold compares the same.
Most visible this is for huge 15K last-call-to-static bonus - it is no longer subtracted from Cost
but rather is now added to Threshold. That makes much more sense, as the cost of inlining (Cost)
is not changed by the fact that internal function is called once. It only changes the likelyhood
of this inlining being profitable (Threshold).


Repository:
  rL LLVM

https://reviews.llvm.org/D60740

Files:
  lib/Analysis/InlineCost.cpp
  test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
  test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
  test/LTO/X86/diagnostic-handler-remarks-with-hotness.ll
  test/LTO/X86/diagnostic-handler-remarks.ll
  test/Transforms/Inline/ARM/inline-fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60740.195275.patch
Type: text/x-patch
Size: 17084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190416/6605e914/attachment.bin>


More information about the llvm-commits mailing list