From f162eace49c2e155d32e20f6d224df3d3efe555a Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Thu, 27 May 2010 19:09:06 +0000 Subject: Teach instCombine to remove malloc+free if malloc's only uses are comparisons to null. Patch by Matti Niemenmaa. llvm-svn: 104871 --- llvm/lib/Transforms/InstCombine/InstCombine.h | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms/InstCombine/InstCombine.h') diff --git a/llvm/lib/Transforms/InstCombine/InstCombine.h b/llvm/lib/Transforms/InstCombine/InstCombine.h index c7b04a4a83a..5509b4f6304 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombine.h +++ b/llvm/lib/Transforms/InstCombine/InstCombine.h @@ -178,6 +178,7 @@ public: Instruction *visitPHINode(PHINode &PN); Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP); Instruction *visitAllocaInst(AllocaInst &AI); + Instruction *visitMalloc(Instruction &FI); Instruction *visitFree(Instruction &FI); Instruction *visitLoadInst(LoadInst &LI); Instruction *visitStoreInst(StoreInst &SI); -- cgit v1.2.3