Set default of inlinecold-threshold to 225.
authorManman Ren <manman.ren@gmail.com>
Thu, 6 Feb 2014 01:59:22 +0000 (01:59 +0000)
committerManman Ren <manman.ren@gmail.com>
Thu, 6 Feb 2014 01:59:22 +0000 (01:59 +0000)
commitc7ac256d525988388c79c8c821a6c2e5d144ae68
tree30cea450cc45e65e4af1d749758814c14bd2c62b
parenta2f4bb9077c4daff751c25218ef33b946fd21fc2
Set default of inlinecold-threshold to 225.

225 is the default value of inline-threshold. This change will make sure
we have the same inlining behavior as prior to r200886.

As Chandler points out, even though we don't have code in our testing
suite that uses cold attribute, there are larger applications that do
use cold attribute.

r200886 + this commit intend to keep the same behavior as prior to r200886.
We can later on tune the inlinecold-threshold.

The main purpose of r200886 is to help performance of instrumentation based
PGO before we actually hook up inliner with analysis passes such as BPI and BFI.
For instrumentation based PGO, we try to increase inlining of hot functions and
reduce inlining of cold functions by setting inlinecold-threshold.

Another option suggested by Chandler is to use a boolean flag that controls
if we should use OptSizeThreshold for cold functions. The default value
of the boolean flag should not change the current behavior. But it gives us
less freedom in controlling inlining of cold functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200898 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/Inliner.cpp
test/Transforms/Inline/inline-cold.ll