aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commitce63d837cc38d5604dfd7f407180fb432b737e0a (patch)
treee87c5a6e0e9d0da2bef62527aa1d8bebe4854a21 /lib
parent658c45911acda231d89ff442f24aa754dcc5c196 (diff)
downloadexternal_llvm-ce63d837cc38d5604dfd7f407180fb432b737e0a.zip
external_llvm-ce63d837cc38d5604dfd7f407180fb432b737e0a.tar.gz
external_llvm-ce63d837cc38d5604dfd7f407180fb432b737e0a.tar.bz2
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')
-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 50400d3..cb9e552 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.