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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 10:07:21 PDT 2021


hoy added a comment.

In D98481#2628143 <https://reviews.llvm.org/D98481#2628143>, @davidxl wrote:

> Without guarding the caller size, this (over topdown inlining) can also potentially happen without recursion.
>
> This patch seems too aggressive. One possible way to handle it is to restrict inlining to a node N in non trivial SCC when node N has >1 fan-out (edges) to other nodes in the same SCC -- the large fan-out is the reason for the excessive growth.

Thanks for the suggestion. Exactly, the excessive growth boils down to the fan-out. An additional check for the fan-out factor should effectively make the restriction less aggressive.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98481



More information about the llvm-commits mailing list