diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-03 22:08:19 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-03 22:08:19 +0000 |
commit | cb348b9b45025393ec5b28eac8bb6773a9b603f6 (patch) | |
tree | 74049a21e8b92bf60a169e917a10f934361363cc /lib/Transforms/InstCombine/InstCombineCalls.cpp | |
parent | 26f61a158b3cce69252c05cc0e79f500d6c3d92e (diff) |
remove calls to calloc if the allocated memory is not used (it was already being done for malloc)
fix a few typos found by Chad in my previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 4196ca6cf79..5fdb57bc7aa 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -172,7 +172,7 @@ Instruction *InstCombiner::SimplifyMemSet(MemSetInst *MI) { Instruction *InstCombiner::visitCallInst(CallInst &CI) { if (isFreeCall(&CI)) return visitFree(CI); - if (isMalloc(&CI)) + if (extractMallocCall(&CI) || extractCallocCall(&CI)) return visitMalloc(CI); // If the caller function is nounwind, mark the call as nounwind, even if the |