[PATCH] D96806: [SampleFDO] Stop repeated indirect call promotion for the same target
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 12:09:57 PST 2021
wmi added a comment.
Currently to prevent recursive indirect call promotion, SampleLoaderPass use a DenseSet PromotedInsns to memorize which indirect call has been promoted inside of current function. However, PromotedInsns is cleared everytime emitAnnotation has done for a function, so it cannot prevent the same indirect call being promoted for the same target again in another iteration of emitAnnotation.
On the other side, because of PromotedInsns, an indirect call is limited to be promoted only for one target in every iteration of emitAnnotation. That limits inline instance profile annotation related with indirect call targets. I think PromotedInsns can be deleted after this patch. I will address it in a followup patch after performance testing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96806/new/
https://reviews.llvm.org/D96806
More information about the llvm-commits
mailing list