OSDN Git Service

[CSSPGO] Factor out common part for CSSPGO inline and AFDO inline
authorWenlei He <aktoon@gmail.com>
Wed, 20 Jan 2021 07:29:14 +0000 (23:29 -0800)
committerTom Stellard <tstellar@redhat.com>
Thu, 4 Feb 2021 03:28:30 +0000 (19:28 -0800)
commitc2f3f45b5c5bd6f9b86a766fc40130b34acb8293
tree6311a73e4e9ced0f250d28e8764f333264401277
parent27ff658e97528540e4425c0cb6400f3e5355f53a
[CSSPGO] Factor out common part for CSSPGO inline and AFDO inline

Refactoring SampleProfileLoader::inlineHotFunctions to use helpers from CSSPGO inlining and reduce similar code in the inlining loop, plus minor cleanup for AFDO path.

This is resubmit of D95024, with build break and overtighten assertion fixed.

Test Plan:

(cherry picked from commit 1645f465be85223e9f5b6303a3e5e0e491fd819f)
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll
llvm/test/Transforms/SampleProfile/remarks.ll