Prevent inlining of callees which allocate lots of memory into a recursive caller.
authorNadav Rotem <nrotem@apple.com>
Wed, 19 Sep 2012 08:08:04 +0000 (08:08 +0000)
committerNadav Rotem <nrotem@apple.com>
Wed, 19 Sep 2012 08:08:04 +0000 (08:08 +0000)
commit92df026f0da91dc65ef6186e97ff87b1f53e8cd0
tree3234226bbf5d5452d9ae30dad950408a61de4757
parent93ba133906da4b12a7c732b897e64541cc570120
Prevent inlining of callees which allocate lots of memory into a recursive caller.

Example:

void foo() {
 ... foo();   // I'm recursive!

  bar();
}

bar() {  int a[1000];  // large stack size }

rdar://10853263

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164207 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/InlineCost.h
lib/Analysis/InlineCost.cpp
test/Transforms/Inline/recurseive.ll [new file with mode: 0644]