[llvm-commits] [PATCH] A fix for the inliner heuristics for recessive calls

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Sep 21 08:59:40 PDT 2012


On 16 September 2012 08:16, Nadav Rotem <nrotem at apple.com> wrote:
> Hi,
>
> I am looking at a test case that looks like this:
>
> void foo() {
>   ... foo();   // I'm recursive!
>
>    bar();
> }
>
> bar() {  int a[1000];  // large stack size }
>
> If we decide to inline bar() into foo()  we may increase the stack size to the point of overflow.   I attached a patch to prevent inlining of callees which allocate large arrays into a recursive caller.


Thanks for working on this. This is llvm.org/pr13700.

> Thanks,
> Nadav
>

Cheers,
Rafael



More information about the llvm-commits mailing list