[all-commits] [llvm/llvm-project] a78f43: [Inliner] Make recusive inlinee stack size limit t...

WenleiHe via All-commits all-commits at lists.llvm.org
Fri Jul 8 21:50:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a78f436c3f523ced389f7cf9f47da25efe43e28e
      https://github.com/llvm/llvm-project/commit/a78f436c3f523ced389f7cf9f47da25efe43e28e
  Author: Wenlei He <aktoon at gmail.com>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M llvm/lib/Analysis/InlineCost.cpp
    A llvm/test/Transforms/Inline/inline-recur-stacksize.ll

  Log Message:
  -----------
  [Inliner] Make recusive inlinee stack size limit tunable

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.

Differential Revision: https://reviews.llvm.org/D129411




More information about the All-commits mailing list