[PATCH] D39869: [Inliner] Inline through indirect call sites having !callees metadata
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 11:04:24 PST 2017
mssimpso added a comment.
In https://reviews.llvm.org/D39869#936138, @davidxl wrote:
> A high level comment: I think the right direction is to share the implementation with the existing IndirectCallPromotion.cpp pass. The analyzer can synthesize the MD_prof profile data for the indirect targets, though the actual target count can be synthesized with some heuristics.
Thanks very much for the feedback, David. Just to clarify, you mean both the indirect call promotion pass and the inliner patch here should use a common interface (like llvm::promoteIndirectCall, et al.) to perform the actual transformation? This makes sense to me, since there's a lot of overlap. There are a few differences in what I've implemented, though. For example, in this patch, we can do the promotion for a single callee without creating an if-then-else structure. I think sharing the implementation might require refactoring the existing code in the indirect call promotion pass somewhat. Are you OK with doing that as a first step?
https://reviews.llvm.org/D39869
More information about the llvm-commits
mailing list