diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-09 18:38:20 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-07-09 18:38:20 +0000 |
commit | 78f8ef42173a3a9867ed789073d4ddc652fb7ff2 (patch) | |
tree | b2c859883f471f5d77bfea9f67a4ca79f61ab44c /test/Transforms | |
parent | 874b863f2ab9158db6f7f1b773b77e6334e31c41 (diff) | |
download | external_llvm-78f8ef42173a3a9867ed789073d4ddc652fb7ff2.zip external_llvm-78f8ef42173a3a9867ed789073d4ddc652fb7ff2.tar.gz external_llvm-78f8ef42173a3a9867ed789073d4ddc652fb7ff2.tar.bz2 |
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
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/objsize.ll | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll index ac488fa..f5a4581 100644 --- a/test/Transforms/InstCombine/objsize.ll +++ b/test/Transforms/InstCombine/objsize.ll @@ -106,7 +106,7 @@ bb12: %struct.data = type { [100 x i32], [100 x i32], [1024 x i8] } -define i32 @test4() nounwind ssp { +define i32 @test4(i8** %esc) nounwind ssp { ; CHECK: @test4 entry: %0 = alloca %struct.data, align 8 @@ -115,6 +115,7 @@ entry: ; CHECK-NOT: @llvm.objectsize ; CHECK: @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 1824, i32 8, i1 false) %3 = call i8* @__memset_chk(i8* %1, i32 0, i32 1824, i32 %2) nounwind + store i8* %1, i8** %esc ret i32 0 } |