[PATCH] D16381: Infrastructure to allow use of PGO in inliner
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 11:42:58 PST 2016
eraman added a comment.
In http://reviews.llvm.org/D16381#341243, @davidxl wrote:
> Nice test case.
> Dehao mentioned there is a problem with BB splitting when a basic block has two callsites -- after the first call gets inlined, the newly split block with the second callsite does not have updated profile data. Please handle that (with a proper test case).
I am working on the fix. I am also going to refactor the code a bit to do all updates in the base Inliner class rather than SimpleInliner. My original reasoning was that we don't have to do the updates for AlwaysInliner, but that is not true. With PGO, if always inline pass inlines a hot callsite, the callee will not be updated with the right entruy count. Besides using callbacks between the base and derived class looks ugly. I am going to move all the updates to the base class (there will still be a callback passed to the cloning methods) and guard the updates with a check for PGO. Later, we can refine this to support updates for non-PGO cases as well.
More information about the llvm-commits