aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/InlineCost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r--lib/Transforms/Utils/InlineCost.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp
index b909203f23..df03b378f0 100644
--- a/lib/Transforms/Utils/InlineCost.cpp
+++ b/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)) {