From e54874471cf565bbacdca69c95ae7287badc578f Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 10 May 2012 17:14:00 +0000 Subject: teach DSE and isInstructionTriviallyDead() about calloc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156553 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Transforms/Utils/Local.cpp') diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index d1c4d59682..4e1a00fa2d 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -260,7 +260,7 @@ bool llvm::isInstructionTriviallyDead(Instruction *I) { return isa(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(CI->getArgOperand(0))) -- cgit v1.2.3