summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2009-10-07 00:54:08 +0000
committerEric Christopher <echristo@apple.com>2009-10-07 00:54:08 +0000
commite666bc9f640bafd3f6c31299a59f9daae892da79 (patch)
treec621ca49700dc53f9315c447cce7479e4897419e
parentfbe6d079e200bb09c2f42229fb292a1d1addf31b (diff)
downloadbcm5719-llvm-e666bc9f640bafd3f6c31299a59f9daae892da79.tar.gz
bcm5719-llvm-e666bc9f640bafd3f6c31299a59f9daae892da79.zip
Add FreeInst to the "is a call" check for Insts that are calls, but
not intrinsics. llvm-svn: 83441
-rw-r--r--llvm/lib/Transforms/Utils/InlineCost.cpp4
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)) {
OpenPOWER on IntegriCloud