[PATCH] D40097: [Inliner][NewPM] Inline functions outside of current SCC first

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 26 20:31:21 PST 2017


haicheng added a comment.

In https://reviews.llvm.org/D40097#932995, @davidxl wrote:

> Using heuristic like this for inline order decision is like  tossing a coin. It is very likely that doing this can hurt some  cases where inlining of inner edges are important but gets blocked.
>
> Due to current practical limitation in the inliner such as lack of the ability to inline self recursive functions, this patch can help to workaround that limitation a little, so the patch looks fine for now, though we should not depend strongly on this inline behavior in the future.


Thank you for your reply.

I agree that this heuristic is not the best, but it is consistent with what the legacy PM does so that we wouldn't have unpleasant surprise (e.g. spec2006/2017 povray listed in the summary) when we switch to the new PM.  When we have a better one, we can certainly replace this heuristic.

Or I can modify the heuristic in this way: only call sites which can make the callers recursive if the callees are inlined are moved to the end of the candidate list.


Repository:
  rL LLVM

https://reviews.llvm.org/D40097





More information about the llvm-commits mailing list