summaryrefslogtreecommitdiff
path: root/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-21 00:43:30 +0000
committerDan Gohman <gohman@apple.com>2010-04-21 00:43:30 +0000
commitd217cfcf468712780cb3b06a36e0ce53897592c1 (patch)
treee87c5a6e0e9d0da2bef62527aa1d8bebe4854a21 /lib/Analysis/InlineCost.cpp
parenta040fffefbc7f653d68154b16b8d3c2ee2a6a639 (diff)
downloadllvm-d217cfcf468712780cb3b06a36e0ce53897592c1.tar.gz
llvm-d217cfcf468712780cb3b06a36e0ce53897592c1.tar.bz2
llvm-d217cfcf468712780cb3b06a36e0ce53897592c1.tar.xz
Revert r101471. For tight recursive functions which have multiple
recursive callsites, inlining can reduce the number of calls by exponential factors, as it does in MultiSource/Benchmarks/Olden/treeadd. More involved heuristics will be needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InlineCost.cpp')
-rw-r--r--lib/Analysis/InlineCost.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 50400d3085..cb9e5526fc 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -263,13 +263,6 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
CS.isNoInline())
return llvm::InlineCost::getNever();
- // Don't inline directly recursive calls, for now. Inlining a directly
- // recursive call is effectively unrolling a loop, so it calls for different
- // heuristics, which aren't implemented yet. Until then, err on the
- // conservative side.
- if (Callee == Caller)
- return llvm::InlineCost::getNever();
-
// InlineCost - This value measures how good of an inline candidate this call
// site is to inline. A lower inline cost make is more likely for the call to
// be inlined. This value may go negative.