[PATCH] D94333: [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 17:46:50 PST 2021


mtrofin added a comment.

In D94333#2491205 <https://reviews.llvm.org/D94333#2491205>, @modimo wrote:

> The modifications to the DefaultInlineAdvice is an attempt to solve the following problem:
>
> 1. In the SampleProfile inliner it emits remarks through the "legacy" interface with `emitInlinedInto`. For replay if advice generates remarks you'll get duplicate remarks but if it doesn't you get a single set (which is what's happening today and correct).
> 2. In the CGSCC inliner in newPM it emits remarks through InlineAdvice via `recordInlining` and nowhere else. For replay if InlineAdvice generates remarks you're good but if it doesn't you get no remarks.
>
> So to solve this issue I have the ReplayAdvisor use DefaultInlineAdvice with modifications to suppress remarks for the SampleProfile inliner.
>
> In D94333#2488360 <https://reviews.llvm.org/D94333#2488360>, @mtrofin wrote:
>
>> I can look into it, we need to look at its uses on the ML side. Perhaps the logging part can be moved, because the InlineCost stuff is very much default policy-specific.
>
> This seems like a cleaner approach than my current solution. I'll need to move the `EmitRemarks` over to the base class which looks to be okay given it can be defaulted to true. Thoughts?

I wouldn't block this patch on that - we can do the refactoring subsequently.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94333/new/

https://reviews.llvm.org/D94333



More information about the llvm-commits mailing list