instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
authorNuno Lopes <nunoplopes@sapo.pt>
Mon, 9 Jul 2012 18:38:20 +0000 (18:38 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Mon, 9 Jul 2012 18:38:20 +0000 (18:38 +0000)
commit78f8ef42173a3a9867ed789073d4ddc652fb7ff2
treeb2c859883f471f5d77bfea9f67a4ca79f61ab44c
parent874b863f2ab9158db6f7f1b773b77e6334e31c41
instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
This patch removes ~70 lines in InstCombineLoadStoreAlloca.cpp and makes both functions a bit more aggressive than before :)
In theory, we can be more aggressive when removing an alloca than a malloc, because an alloca pointer should never escape, but we are not taking advantage of this anyway

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159952 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombine.h
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/objsize.ll