[PATCH] D98481: [Inliner] Do not inline mutual-recursive functions to avoid exponential size growth.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 11:49:13 PDT 2021


that is fine if it does not add visible compile time overhead (e.g, to
compute and track size).

David

On Wed, Mar 17, 2021 at 11:46 AM Hongtao Yu <hoy at fb.com> wrote:

> Thanks for the suggestion. I was thinking about capping on function size
> so that small callees such as getters/setters can always be inlined. What
> do you think?
>
>
>
>
>
> *From: *Xinliang David Li <davidxl at google.com>
> *Date: *Wednesday, March 17, 2021 at 9:02 AM
> *To: *Hongtao Yu <reviews+D98481+public+2d824aa1c1081e47 at reviews.llvm.org>
> *Cc: *Hongtao Yu <hoy at fb.com>, Wenlei He <wenlei at fb.com>, Kazu Hirata <
> kazu at google.com>, Chandler Carruth <chandlerc at gmail.com>, Wei Mi <
> wmi at google.com>, Easwaran Raman <eraman at google.com>, llvm-commits <
> llvm-commits at lists.llvm.org>, bhuvanendra.kumarn at amd.com <
> bhuvanendra.kumarn at amd.com>, 88888yl at gmail.com <88888yl at gmail.com>,
> dougpuob at gmail.com <dougpuob at gmail.com>, David Green <david.green at arm.com>
> *Subject: *Re: [PATCH] D98481: [Inliner] Do not inline mutual-recursive
> functions to avoid exponential size growth.
>
>
>
>
>
> On Tue, Mar 16, 2021 at 11:43 PM Hongtao Yu via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
> hoy added a comment.
>
> A cap sounds good to me, since that's something we've been looking for for
> a long time. Regarding the cap, what kind of cap do you think will be
> appropriate? A cap on function size growth or a cap on how many times an
> original callsite can be inlined iteratively? Regarding the later, I was
> wondering what's a good way to track a callsite across SCC and function
> passes.
>
>
>
> I think the latter -- but in a local sense. For callsite a-->b, have a cap
> on the total number of callsites that can be inlined into 'a' iteratively.
> When the cap is reached, break out the worklist loop.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D98481/new/
>
> https://reviews.llvm.org/D98481
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210317/237956b1/attachment.html>


More information about the llvm-commits mailing list