From 0704300d88acfd85f64a9243153af2716c2c20a6 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 7 Oct 2009 00:02:18 +0000 Subject: 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 --- lib/Transforms/Utils/InlineCost.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Transforms/Utils/InlineCost.cpp') diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index a61b1a9b0c..b909203f23 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; -- cgit v1.2.3-18-g5258