[PATCH] D110658: [InlineAdvisor] Add -inline-replay-strict to replay inline decisions only in callers that have remarks

Di Mo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 18:28:07 PDT 2021


modimo added a comment.

In D110658#3060164 <https://reviews.llvm.org/D110658#3060164>, @wenlei wrote:

> lgtm, thanks.
>
>> That being said, negative mode itself is different in that it assumes all other legal sites will be inlined.
>
> Depends on how we define it. This is how I think about it now: in non-strict mode, positive/negative means do or don't do certain inlining, but leave the rest to default heuristic. With strict mode, anything unspecific gets the opposite replay decision (not inline for positive, inline for negative). With that definition, negative is no different in that it can have both strict and non-strict mode.

Ah, I'm thinking ""will not be inlined into" vs. "inlined into" in the remarks is the differentiation for positive/negative. Thinking further, in that setup only strict-negative and strict-positive would exist as modifiers. If implemented we would drop the strict naming completely: unspecified would mean leave it to the heuristic and positive/negative would mean always not inline/inline call sites without remarks associated with them.

>> Negative mode only really works in function-scope since module scope would likely lead to never-ending compilation.
>
> I think negative + strict only works in function-scope; but negative + non-strict should be fine. On the other hand, people can spell out all negative decision in input, same as positive ones, then negative + strict works for whole program too.

True, what I described is actually strict-negative mode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110658



More information about the llvm-commits mailing list