diff options
| author | Eric Christopher <echristo@apple.com> | 2009-10-07 00:54:08 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2009-10-07 00:54:08 +0000 |
| commit | e666bc9f640bafd3f6c31299a59f9daae892da79 (patch) | |
| tree | c621ca49700dc53f9315c447cce7479e4897419e /llvm/lib/Transforms/Utils | |
| parent | fbe6d079e200bb09c2f42229fb292a1d1addf31b (diff) | |
| download | bcm5719-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
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -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)) { |

