[PATCH] D98481: [Inliner] Do not inline mutual-recursive functions to avoid exponential size growth.
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 15:49:34 PDT 2021
wenlei added a comment.
In D98481#3062526 <https://reviews.llvm.org/D98481#3062526>, @nikic wrote:
> We've encountered variants of this issue as well. I think this is a rather critical problem that needs to be addressed in a simple, release-backportable way, even if that fix causes performance regressions in some cases. A slower build is still better than no build at all. We can't even bootstrap rustc on some platforms anymore due to this problem.
>
> The approach in this patch seems pretty sensible as a simple starting point and was previously suggested by @aeubanks in https://bugs.llvm.org/show_bug.cgi?id=45253 as well.
This patch as is would be too aggressive as discussed above. There had been some discussion off patch. We converged on the proposal above to introduce `-inline-size-limit` and `-stop-inline-for-size-limit` - that doesn't change default behavior so it won't suddenly throttle performance for others, but offers users the ability to get around pathological cases when needed. Would that solve the problem you have at hand?
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