[PATCH] D20603: [Opt] Add ability to restrict inlining pass to hinted functions only

Rudy Pons via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 15:33:39 PDT 2016


Ilod created this revision.
Ilod added a reviewer: chandlerc.
Ilod added a subscriber: llvm-commits.

This adds an OnlyHint parameter to createFunctionInliningPass functions, and a -inline-restrict-to-hint command line parameter.
These allows to restrict the inlining pass to hinted functions only.

Before this, the only way to achieve something similar was to use the -inline-threshold and -inlinehint-threshold command line arguments, while using a negative enough value for -inline-threshold to avoid any inlining (even thoses reducing the size). Moreover, there was no clear interface for this other than the command line arguments.

Adding it will allow a straightforward implementation for /Ob1 in clang-cl.

http://reviews.llvm.org/D20603

Files:
  include/llvm/Transforms/IPO.h
  lib/Transforms/IPO/InlineSimple.cpp
  test/Transforms/Inline/inline-hint.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20603.58333.patch
Type: text/x-patch
Size: 4918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160524/1abcc762/attachment.bin>


More information about the llvm-commits mailing list