In SamplePGO, when an indirect call is promoted in the profiled binary, before profile annotation, it will be promoted and inlined. For the original indirect call, the current implementation will not mark VP profile on it. This is an issue when profile becomes stale. This patch annotates VP prof on indirect calls during annotation.
Details
Diff Detail
- Build Status
Buildable 10781 Build 10781: arc lint + arc unit
Event Timeline
Summary has a couple of typos
lib/Transforms/IPO/SampleProfile.cpp | ||
---|---|---|
514–515 | How do we know it was inlined in the profile from the below checks? | |
519 | Comment needs update. It isn't clear to me why indirect calls are handled differently. I understand that you want to annotate the fallback indirect call with any VP metadata it collected. But couldn't the promoted/inlined indirect call in the profiled binary have the same situation (inlined callsite had no sample)? I think this goes back to my first question above, about how we know it was inlined in the profile from here. |
lib/Transforms/IPO/SampleProfile.cpp | ||
---|---|---|
514–515 | Updated the comment to make it clear. | |
519 | Comment updated to make it clear. Basically this only applies to direct call. For indirect call, even if the call is promoted and inlined, we will still get profile for the indirect call, so should not blindly set it as 0. |
How do we know it was inlined in the profile from the below checks?