[llvm] r266249 - Return immediately from analyzeCall if analyzeBlock returns false.
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 14:20:23 PDT 2016
Author: eraman
Date: Wed Apr 13 16:20:22 2016
New Revision: 266249
URL: http://llvm.org/viewvc/llvm-project?rev=266249&view=rev
Log:
Return immediately from analyzeCall if analyzeBlock returns false.
This is part of the patch reviewed at http://reviews.llvm.org/D17584
Modified:
llvm/trunk/lib/Analysis/InlineCost.cpp
Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=266249&r1=266248&r2=266249&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
+++ llvm/trunk/lib/Analysis/InlineCost.cpp Wed Apr 13 16:20:22 2016
@@ -1337,20 +1337,8 @@ bool CallAnalyzer::analyzeCall(CallSite
// 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();
More information about the llvm-commits
mailing list