[PATCH] D36054: Emit only A Single Opt Remark When Inlining

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 00:23:26 PDT 2017


lenary updated this revision to Diff 108869.
lenary added a comment.

Update shouldInline in Inliner to return the InlineCost, rather
than recomputing the cost.

I had to be a little hack-y around TotalSecondaryCost, but
I couldn't see a better way to do that.

Also I added a getThreshold() method to InlineCost for use in
messages, rather than reversing how getCostDelta() is calculated.


https://reviews.llvm.org/D36054

Files:
  include/llvm/Analysis/InlineCost.h
  lib/Transforms/IPO/Inliner.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/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
  test/ThinLTO/X86/diagnostic-handler-remarks.ll
  test/Transforms/Inline/optimization-remarks-passed-yaml.ll
  test/Transforms/Inline/optimization-remarks-with-hotness.ll
  test/Transforms/Inline/optimization-remarks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36054.108869.patch
Type: text/x-patch
Size: 14098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170731/2f521386/attachment.bin>


More information about the llvm-commits mailing list