aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/InlineCost.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-01-12 22:11:50 +0000
committerDale Johannesen <dalej@apple.com>2009-01-12 22:11:50 +0000
commitcbfdf9644ce38fd3404469c26ac3c8466c940b6e (patch)
tree1645efb483d9e0820b3f8cff1a9e3e6065a48d77 /lib/Transforms/Utils/InlineCost.cpp
parent486938f7a1d17a547c6c05565aacd6051fad47c9 (diff)
Enable recursive inlining. Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than it gains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r--lib/Transforms/Utils/InlineCost.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp
index 90d72efa36..97f0bf8025 100644
--- a/lib/Transforms/Utils/InlineCost.cpp
+++ b/lib/Transforms/Utils/InlineCost.cpp
@@ -180,14 +180,12 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
Function *Callee = CS.getCalledFunction();
Function *Caller = TheCall->getParent()->getParent();
- // Don't inline a directly recursive call.
- if (Caller == Callee ||
// Don't inline functions which can be redefined at link-time to mean
// something else.
// FIXME: We allow link-once linkage since in practice all versions of
// the function have the same body (C++ ODR) - but the LLVM definition
// of LinkOnceLinkage doesn't require this.
- (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
+ if ((Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
// Don't inline functions marked noinline.
Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee))
return llvm::InlineCost::getNever();