PATCH: Refactor the inliner threshold settings into a function

Eli Bendersky eliben at google.com
Tue Mar 11 15:59:13 PDT 2014


Hello,

There's a bit of duplicated "magic" code in opt.cpp and Clang's CodeGen
that computes the inliner threshold from opt level and size opt level.

This patch moves the code to a function that lives alongside the inliner
itself, providing a convenient overload to the inliner creation.

A separate patch can be committed to Clang to use this once it's committed
to LLVM. Standalone tools that use the inlining pass can also avoid
duplicating this code and fearing it will go out of sync.

PTAL,
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140311/1b8ad26c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor-inliner-threshold-settings.1.patch
Type: text/x-patch
Size: 2798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140311/1b8ad26c/attachment.bin>


More information about the llvm-commits mailing list