diff options
author | Duncan Sands <baldrick@free.fr> | 2010-05-27 19:09:06 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-05-27 19:09:06 +0000 |
commit | f162eace49c2e155d32e20f6d224df3d3efe555a (patch) | |
tree | 2e66a8a4e18c7f99e4c826943ddf7544079239f6 /llvm/lib/Transforms/InstCombine/InstCombine.h | |
parent | b68dfb45f5c9712e44329871bfc989b67ff687de (diff) | |
download | bcm5719-llvm-f162eace49c2e155d32e20f6d224df3d3efe555a.tar.gz bcm5719-llvm-f162eace49c2e155d32e20f6d224df3d3efe555a.zip |
Teach instCombine to remove malloc+free if malloc's only uses are comparisons
to null. Patch by Matti Niemenmaa.
llvm-svn: 104871
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombine.h')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombine.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |