[CSSPGO] Honor preinliner decision for ThinLTO importing
authorWenlei He <aktoon@gmail.com>
Wed, 1 Sep 2021 20:47:19 +0000 (13:47 -0700)
committerWenlei He <aktoon@gmail.com>
Thu, 2 Sep 2021 15:24:06 +0000 (08:24 -0700)
commita2768b4732a0216dfd346d34e428685f03f10549
treebac3da3b19d80f36740e795fa906e705c351ced3
parent3891b45a06f9192b7185d03269717cd60dfdea13
[CSSPGO] Honor preinliner decision for ThinLTO importing

When pre-inliner decision is used for CSSPGO, we should take that into account for ThinLTO importing as well, so post-link sample loader inliner can favor that decision. This is handled by a small tweak in this patch. It also includes a change to transfer preinliner decision when merging context.

Differential Revision: https://reviews.llvm.org/D109088
llvm/lib/Transforms/IPO/SampleContextTracker.cpp
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/SampleProfile/csspgo-use-preinliner.ll