diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-10 17:14:00 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-10 17:14:00 +0000 |
commit | 300d629924b25301decd0d851f07d277a842e929 (patch) | |
tree | fe4a9fa884c2c9f91775ea050cef7f285d2e2012 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | b6e9b6cfe7a8c1a8156fa4029a1a225cae392f12 (diff) | |
download | bcm5719-llvm-300d629924b25301decd0d851f07d277a842e929.tar.gz bcm5719-llvm-300d629924b25301decd0d851f07d277a842e929.zip |
teach DSE and isInstructionTriviallyDead() about calloc
llvm-svn: 156553
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index d1c4d596823..4e1a00fa2d3 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -260,7 +260,7 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) { return isa<UndefValue>(II->getArgOperand(1)); } - if (extractMallocCall(I)) return true; + if (extractMallocCall(I) || extractCallocCall(I)) return true; if (CallInst *CI = isFreeCall(I)) if (Constant *C = dyn_cast<Constant>(CI->getArgOperand(0))) |