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 | d4cf35d77576c8de1e958937aed5445a81f6989b (patch) | |
tree | db2c08363ca8a03d03b8df5c4e4acffd0080b233 /llvm/lib/Transforms | |
parent | f8e5e3c072ac81a8987bc8dea86facd4b7fda9d8 (diff) | |
download | bcm5719-llvm-d4cf35d77576c8de1e958937aed5445a81f6989b.tar.gz bcm5719-llvm-d4cf35d77576c8de1e958937aed5445a81f6989b.zip |
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
llvm-svn: 156110
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 4196ca6cf79..5fdb57bc7aa 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/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 |