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

Nadav Rotem nrotem at apple.com
Sun Sep 16 05:16:43 PDT 2012


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,
Nadav 


 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recursive_inline.diff
Type: application/octet-stream
Size: 4814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120916/9b0fd59b/attachment.obj>


More information about the llvm-commits mailing list