diff options
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index b909203f234..df03b378f07 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -135,8 +135,8 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) { NumInsts += 5; } - // This, too, is a call. - if (isa<MallocInst>(II)) + // These, too, are calls. + if (isa<MallocInst>(II) || isa<FreeInst>(II)) NumInsts += 5; if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) { |