summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-07-09 18:38:20 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-07-09 18:38:20 +0000
commit95cc4f3cb5d89197d649251edcbaf4e9d2d14637 (patch)
tree7172b5bd08bb0baf2ed3d9dd5618b866b268346b /llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
parent2987c57924b69f5af7fed5748de6d05d0d5c6e50 (diff)
downloadbcm5719-llvm-95cc4f3cb5d89197d649251edcbaf4e9d2d14637.tar.gz
bcm5719-llvm-95cc4f3cb5d89197d649251edcbaf4e9d2d14637.zip
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 llvm-svn: 159952
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index f74cff85c65..c1d9d01c8d8 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -880,7 +880,7 @@ static IntrinsicInst *FindInitTrampoline(Value *Callee) {
//
Instruction *InstCombiner::visitCallSite(CallSite CS) {
if (isAllocLikeFn(CS.getInstruction()))
- return visitMalloc(*CS.getInstruction());
+ return visitAllocSite(*CS.getInstruction());
bool Changed = false;
OpenPOWER on IntegriCloud