projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd31b17
)
Add FreeInst to the "is a call" check for Insts that are calls, but
author
Eric Christopher
<echristo@apple.com>
Wed, 7 Oct 2009 00:54:08 +0000
(
00:54
+0000)
committer
Eric Christopher
<echristo@apple.com>
Wed, 7 Oct 2009 00:54:08 +0000
(
00:54
+0000)
not intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83441
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/InlineCost.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/InlineCost.cpp
b/lib/Transforms/Utils/InlineCost.cpp
index b909203f234d3f2ee74e6fc7e451e999738a7f41..df03b378f07b7ef36ead1daf4ea44749a7c27f15 100644
(file)
--- a/
lib/Transforms/Utils/InlineCost.cpp
+++ b/
lib/Transforms/Utils/InlineCost.cpp
@@
-135,8
+135,8
@@
void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
NumInsts += 5;
}
- // Th
is, too, is a call
.
- if (isa<MallocInst>(II))
+ // Th
ese, too, are calls
.
+ if (isa<MallocInst>(II)
|| isa<FreeInst>(II)
)
NumInsts += 5;
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {