[CSSPGO] Minor tweak for inline candidate priority tie breaker
authorWenlei He <aktoon@gmail.com>
Thu, 25 Mar 2021 18:15:35 +0000 (11:15 -0700)
committerWenlei He <aktoon@gmail.com>
Fri, 26 Mar 2021 04:15:36 +0000 (21:15 -0700)
commit5f59f407f59f69c248be2452e5923e6735e7019a
treea17721adcd353cbfc15bcfaf9ef738bbe31d25c2
parent850fcedb272ff07ac46b9880e628caec2de3eb2c
[CSSPGO] Minor tweak for inline candidate priority tie breaker

When prioritize call site to consider for inlining in sample loader, use number of samples as a first tier breaker before using name/guid comparison. This would favor smaller functions when hotness is the same (from the same block). We could try to retrieve accurate function size if this turns out to be more important.

Differential Revision: https://reviews.llvm.org/D99370
llvm/lib/Transforms/IPO/SampleProfile.cpp