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 | 00d67db384961e69993537135e488ed6efc29903 (patch) | |
tree | 20bf795df1a06c9cb2abd168460e006b0e6819c5 /lib | |
parent | bd31b173d276cb488b5fa72de8d42ae192cbfc97 (diff) | |
download | external_llvm-00d67db384961e69993537135e488ed6efc29903.tar.gz external_llvm-00d67db384961e69993537135e488ed6efc29903.tar.bz2 external_llvm-00d67db384961e69993537135e488ed6efc29903.zip |
Add FreeInst to the "is a call" check for Insts that are calls, but
not intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 4 |
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)) { |