summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
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
commit433a9086c0327fc87281b5c9de4960ea05b7a177 (patch)
treeb857db93915622497856df7b4c9e47a1ecdeb0c6 /llvm/lib/Transforms/Utils
parent7e90422e951563092561db564cf11e7fd179d660 (diff)
downloadbcm5719-llvm-433a9086c0327fc87281b5c9de4960ea05b7a177.tar.gz
bcm5719-llvm-433a9086c0327fc87281b5c9de4960ea05b7a177.zip
Enable recursive inlining. Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than it gains. llvm-svn: 62107
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/InlineCost.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp
index 90d72efa36d..97f0bf80254 100644
--- a/llvm/lib/Transforms/Utils/InlineCost.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud