Dan recently disabled recursive inlining within a function, but we
authorChris Lattner <sabre@nondot.org>
Fri, 30 Apr 2010 22:37:22 +0000 (22:37 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 30 Apr 2010 22:37:22 +0000 (22:37 +0000)
commit4b7b42c831b8f808dbd6e34d697ac10758ab04e9
tree5cbcdb884e50efea446dc12f295e76cce03b0c98
parentd71bb562758c417e91ab05424cea93264b35c67a
Dan recently disabled recursive inlining within a function, but we
were still inlining self-recursive functions into other functions.

Inlining a recursive function into itself has the potential to
reduce recursion depth by a factor of 2, inlining a recursive
function into something else reduces recursion depth by exactly
1.  Since inlining a recursive function into something else is a
weird form of loop peeling, turn this off.

The deleted testcase was added by Dale in r62107, since then
we're leaning towards not inlining recursive stuff ever.  In any
case, if we like inlining recursive stuff, it should be done
within the recursive function itself to get the algorithm
recursion depth win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102798 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InlineCost.cpp
test/Transforms/Inline/2009-01-12-RecursiveInline.ll [deleted file]
test/Transforms/Inline/noinline-recursive-fn.ll [new file with mode: 0644]