[PATCH] D81743: InlineCostAnnotationPrinterPass - Introducing the pass

Kirill Naumov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 07:42:48 PDT 2020


knaumov updated this revision to Diff 271081.
knaumov added a comment.

- Refactored the comment

For now, my view of the pass is to be able to tell what optimizations are seen and predicted by InlineCost. E.g. is a follow-up patch D81024 <https://reviews.llvm.org/D81024> which enables printing of constants to which the instruction will be simplified. For now, if you've written a simplification for InlineCost that constant-folds some sequence of instructions, you have no way of writing test for it except by setting the inline threshold so low, so the fact of simplification will inline the method. This pass provides an easy way to see such cases directly. Also, the fact of simplification itself is independent of InlineParams, so the pass would work as expected.


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

https://reviews.llvm.org/D81743

Files:
  llvm/include/llvm/Analysis/InlineCost.h
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/test/Transforms/Inline/debuginline-cost-delta.ll
  llvm/test/Transforms/Inline/inline-cost-annotation-pass.ll
  llvm/test/Transforms/Inline/print-instructions-deltas-unfinished.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81743.271081.patch
Type: text/x-patch
Size: 8046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200616/cf8b4ca4/attachment-0001.bin>


More information about the llvm-commits mailing list