[PATCH] D49412: Enrich inline messages

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 16 22:11:01 PDT 2018


yrouban created this revision.
yrouban added reviewers: craig.topper, sammccall, sgraenitz, NutshellySima, shchenz, chandlerc, apilipenko, llvm-commits.
Herald added subscribers: dexonsmith, steven_wu, haicheng, eraman, nhaehnle, mehdi_amini, arsenm.
Herald added a reviewer: javed.absar.

This patch improves Inliner to provide causes/reasons for negative inline decisions.

1. It adds one new message field to InlineCost to report causes for Always and Never instances. All Never and Always instantiations must provide a simple message.
2. Several functions that used to return the inlining results as boolean are changed to return InlineResult which carries the cause for negative decision.
3. Changed remark priniting and debug output messages to provide the additional messages and related inline cost.
4. Adjusted tests for changed printing.


https://reviews.llvm.org/D49412

Files:
  include/llvm/Analysis/InlineCost.h
  include/llvm/IR/DiagnosticInfo.h
  include/llvm/Transforms/Utils/Cloning.h
  lib/Analysis/InlineCost.cpp
  lib/Target/AMDGPU/AMDGPUInline.cpp
  lib/Transforms/IPO/AlwaysInliner.cpp
  lib/Transforms/IPO/Inliner.cpp
  lib/Transforms/Utils/InlineFunction.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/ARM/inline-fp.ll
  test/Transforms/Inline/optimization-remarks-passed-yaml.ll
  test/Transforms/Inline/optimization-remarks-with-hotness.ll
  test/Transforms/Inline/optimization-remarks.ll
  test/tools/gold/X86/opt-remarks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49412.155808.patch
Type: text/x-patch
Size: 42788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180717/ad18d59c/attachment-0001.bin>


More information about the llvm-commits mailing list