This is an archive of the discontinued LLVM Phabricator instance.

[Inliner] Make recusive inlinee stack size limit tunable
ClosedPublic

Authored by wenlei on Jul 8 2022, 5:20 PM.

Details

Summary

For recursive callers, we want to be conservative when inlining callees with large stack size. We currently have a limit InlineConstants::TotalAllocaSizeRecursiveCaller, but that is hard coded.

We found the current limit insufficient to suppress problematic inlining that bloats stack size for deep recursion. This change adds a switch to make the limit tunable as a mitigation.

Diff Detail

Event Timeline

wenlei created this revision.Jul 8 2022, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 5:20 PM
wenlei requested review of this revision.Jul 8 2022, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 5:20 PM
davidxl accepted this revision.Jul 8 2022, 8:55 PM

lgtm

This revision is now accepted and ready to land.Jul 8 2022, 8:55 PM
This revision was landed with ongoing or failed builds.Jul 8 2022, 9:50 PM
This revision was automatically updated to reflect the committed changes.