summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEaswaran Raman <eraman@google.com>2016-04-13 21:20:22 +0000
committerEaswaran Raman <eraman@google.com>2016-04-13 21:20:22 +0000
commitd295b00ae9a6204dd4586c4c18a1e770e007f185 (patch)
treee2a7a40ab2ff15c6021e98f435e814e82841e291
parent870257455762cc35b609e6050abebd905d73dccc (diff)
downloadbcm5719-llvm-d295b00ae9a6204dd4586c4c18a1e770e007f185.tar.gz
bcm5719-llvm-d295b00ae9a6204dd4586c4c18a1e770e007f185.zip
Return immediately from analyzeCall if analyzeBlock returns false.
This is part of the patch reviewed at http://reviews.llvm.org/D17584 llvm-svn: 266249
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index e29c09e7cab..c3df122fd0a 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1337,20 +1337,8 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {
// Analyze the cost of this block. If we blow through the threshold, this
// returns false, and we can bail on out.
- if (!analyzeBlock(BB, EphValues)) {
- if (IsRecursiveCall || ExposesReturnsTwice || HasDynamicAlloca ||
- HasIndirectBr || HasFrameEscape)
- return false;
-
- // If the caller is a recursive function then we don't want to inline
- // functions which allocate a lot of stack space because it would increase
- // the caller stack usage dramatically.
- if (IsCallerRecursive &&
- AllocatedSize > InlineConstants::TotalAllocaSizeRecursiveCaller)
- return false;
-
- break;
- }
+ if (!analyzeBlock(BB, EphValues))
+ return false;
TerminatorInst *TI = BB->getTerminator();
OpenPOWER on IntegriCloud