HomePhabricator

[CSSPGO] Use callsite sample counts to annotate indirect call sites.

Authored by hoy on Feb 18 2021, 12:44 PM.

Description

[CSSPGO] Use callsite sample counts to annotate indirect call sites.

With CSSPGO all indirect call targets are counted torwards the original indirect call site in the profile, including both inlined and non-inlined targets. Therefore no need to look for callee entry counts. This also fixes the issue where callee entry count doesn't match callsite count due to the nature of CS sampling.

I'm also cleaning up the orginal code that called findIndirectCallFunctionSamples just to compute the sum, the return value of which was disgarded.

Reviewed By: wmi, wenlei

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

Details