mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-28 17:06:31 +00:00
Return immediately from analyzeCall if analyzeBlock returns false.
This is part of the patch reviewed at http://reviews.llvm.org/D17584 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63247519d7
commit
f9ce506ef6
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user