[Inliner] Increase threshold for hot callsites without PGO.
authorEaswaran Raman <eraman@google.com>
Thu, 3 Aug 2017 22:23:33 +0000 (22:23 +0000)
committerEaswaran Raman <eraman@google.com>
Thu, 3 Aug 2017 22:23:33 +0000 (22:23 +0000)
commit974d4eea93a62d54f53f569deb1038bd5c0fb207
tree941a27f46c2e32e6edb0bfbb01e336ad68a23d73
parent79220eaeecccf77591c0a1bdfbd2ecd3ec015e21
[Inliner] Increase threshold for hot callsites without PGO.

Summary:
This increases the inlining threshold for hot callsites. Hotness is
defined in terms of block frequency of the callsite relative to the
caller's entry block's frequency. Since this requires BFI in the
inliner, this only affects the new PM pipeline. This is enabled by
default at -O3.

This improves the performance of some internal benchmarks. Notably, an
internal benchmark for Gipfeli compression
(https://github.com/google/gipfeli) improves by ~7%. Povray in SPEC2006
improves by ~2.5%. I am running more experiments and will update the
thread if other benchmarks show improvement/regression.

In terms of text size, LLVM test-suite shows an 1.22% text size
increase. Diving into the results, 13 of the benchmarks in the
test-suite increases by > 10%. Most of these are small, but
Adobe-C++/loop_unroll (17.6% increases) and tramp3d(20.7% size increase)
have >250K text size. On a large application, the text size increases by
2%

Reviewers: chandlerc, davidxl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36199

llvm-svn: 309994
llvm/include/llvm/Analysis/InlineCost.h
llvm/lib/Analysis/InlineCost.cpp