From: Eric Christopher Date: Wed, 7 Oct 2009 00:02:18 +0000 (+0000) Subject: While we still have a MallocInst treat it as a call like any other X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0704300d88acfd85f64a9243153af2716c2c20a6;p=oota-llvm.git While we still have a MallocInst treat it as a call like any other for inlining. When MallocInst goes away this code will be subsumed as part of calls and work just fine... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83434 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index a61b1a9b0c2..b909203f234 100644 --- a/lib/Transforms/Utils/InlineCost.cpp +++ b/lib/Transforms/Utils/InlineCost.cpp @@ -135,6 +135,10 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) { NumInsts += 5; } + // This, too, is a call. + if (isa(II)) + NumInsts += 5; + if (const AllocaInst *AI = dyn_cast(II)) { if (!AI->isStaticAlloca()) this->usesDynamicAlloca = true;