The inliner has traditionally not considered call sites
authorChris Lattner <sabre@nondot.org>
Sat, 1 May 2010 01:05:10 +0000 (01:05 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 1 May 2010 01:05:10 +0000 (01:05 +0000)
commit159528702aed7222cb30c3e8b55287e4ca8068cf
treeaba3694ba2e263e867cc0151f1d96690d7f053b1
parent3a401bcd04e3a04eea9e91649e1a820ff7cc60c1
The inliner has traditionally not considered call sites
that appear due to inlining a callee as candidates for
futher inlining, but a recent patch made it do this if
those call sites were indirect and became direct.

Unfortunately, in bizarre cases (see testcase) doing this
can cause us to infinitely inline mutually recursive
functions into callers not in the cycle.  Fix this by
keeping track of the inline history from which callsite
inline candidates got inlined from.

This shouldn't affect any "real world" code, but is required
for a follow on patch that is coming up next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102822 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/Inliner.cpp
test/Transforms/Inline/noinline-recursive-fn.ll