aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringMapTest.cpp
diff options
context:
space:
mode:
authorWenlei He <aktoon@gmail.com>2021-09-01 15:30:33 -0700
committerWenlei He <aktoon@gmail.com>2021-09-02 11:24:27 -0700
commitf7fff46acc86163cadfee481be6acc6b76659fc4 (patch)
treea8d7904c42df30b535b5d156b5b874fbebae7e30 /llvm/unittests/ADT/StringMapTest.cpp
parentc86e1ce73bb6d70d255df9bf7700d09db07e7af8 (diff)
downloadllvm-f7fff46acc86163cadfee481be6acc6b76659fc4.zip
llvm-f7fff46acc86163cadfee481be6acc6b76659fc4.tar.gz
llvm-f7fff46acc86163cadfee481be6acc6b76659fc4.tar.bz2
[CSSPGO] Allow inlining recursive call for preinliner
When preinliner is used for CSSPGO, we try to honor global preinliner decision as much as we can except for uninlinable callees. We rely on InlineCost::Never to prevent us from illegal inlining. However, it turns out that we use InlineCost::Never for both illeagle inlining and some of the "not-so-beneficial" inlining. The most common one is recursive inlining, while it can bloat size a lot during CGSCC bottom-up inlining, it's less of a problem when recursive inlining is guided by profile and done in top-down manner. Ideally it'd be better to have a clear separation between inline legality check vs cost-benefit check, but that requires a bigger change. This change enables InlineCost computation to allow inlining recursive calls, controlled by InlineParams. In SampleLoader, we now enable recursive inlining for CSSPGO when global preinliner decision is used. With this change, we saw a few perf improvements on SPEC2017 with CSSPGO and preinliner on: 2% for povray_r, 6% for xalancbmk_s, 3% omnetpp_s, while size is about the same (no noticeable perf change for all other benchmarks) Differential Revision: https://reviews.llvm.org/D109104
Diffstat (limited to 'llvm/unittests/ADT/StringMapTest.cpp')
0 files changed, 0 insertions, 0 deletions