[all-commits] [llvm/llvm-project] 1662cf: [CSSPGO][CSProfileConverter] Remove call target sa...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Fri May 13 09:19:48 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1662cfa4be33edd94ab71f8aa83676eb8b378f4a
https://github.com/llvm/llvm-project/commit/1662cfa4be33edd94ab71f8aa83676eb8b378f4a
Author: Hongtao Yu <hoy at fb.com>
Date: 2022-05-13 (Fri, 13 May 2022)
Changed paths:
M llvm/include/llvm/ProfileData/SampleProf.h
M llvm/lib/ProfileData/SampleProf.cpp
M llvm/test/tools/llvm-profdata/cs-sample-nested-profile.test
M llvm/test/tools/llvm-profgen/cs-preinline.test
Log Message:
-----------
[CSSPGO][CSProfileConverter] Remove call target samples when including callee samples into caller.
When a flat CS profile is converted to a nested profile, the call target samples for inlined callee contexts are left over in the callsite target map. This could cause indirect call promotion to function improperly. One issue is that the inlined callsites are treated with double amount of samples. The other is the inlined callsites are reconsidered for subsequent PGO ICP.
I'm fixing this by excluding call targets from the callsite for inlined targets. While fixing this I found that callsite target sum and the number of body samples for that callsite could be mismatched. {D122609} has an explanation and a fix for that on llvm-profgen side. For now I'm tolerating it in this change.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D125266
More information about the All-commits
mailing list