aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2020-05-25 15:43:28 -0700
committerKazu Hirata <kazu@google.com>2020-05-25 15:44:20 -0700
commitcec20db588254289dc2953517310b9886f6dc243 (patch)
treed3f421057770cf58b47f61411cef379e8ee6112f /llvm/lib/IR/Module.cpp
parent179c80117c91fc3ba3079740a91de40d98b18916 (diff)
downloadllvm-cec20db588254289dc2953517310b9886f6dc243.zip
llvm-cec20db588254289dc2953517310b9886f6dc243.tar.gz
llvm-cec20db588254289dc2953517310b9886f6dc243.tar.bz2
[Inlining] Set inline-deferral-scale to 2.
Summary: This patch sets inline-deferral-scale to 2. Both internal and SPEC benchmarking show that 2 is the best number among -1, 2, 3, and 4. inline-deferral-scale SPECint2006 ------------------------------------------------------------ -1 38.0 (the default without this patch) 2 38.5 3 38.1 4 38.1 With the new default number, shouldBeDeferred returns true if: TotalCost < IC.getCost() * 2 where TotalCost is TotalSecondaryCost + IC.getCost() * NumCallerUsers. If TotalCost >= 0 and NumCallerUsers >= 2, then TotalCost >= IC.getCost() * 2, so shouldBeDeferred returns true only when NumCallerUsers is 1. Now, if TotalSecondaryCost < 0, which can happen if InlineConstants::LastCallToStaticBonus, a huge number, has been subtracted from TotalSecondaryCost, then TotalCost may be negative. In this case, shouldBeDeferred may return true even when NumCallerUsers >= 2. Reviewers: davidxl, nikic Reviewed By: davidxl Subscribers: xbolva00, hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80229
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions