hanchenye-llvm-project/llvm/lib/Transforms
Erik Eckstein 11fc8175d9 [DeadStoreElimination] remove a redundant store even if the load is in a different block.
DeadStoreElimination does eliminate a store if it stores a value which was loaded from the same memory location.
So far this worked only if the store is in the same block as the load.
Now we can also handle stores which are in a different block than the load.
Example:

define i32 @test(i1, i32*) {
entry:
  %l2 = load i32, i32* %1, align 4
  br i1 %0, label %bb1, label %bb2
bb1:
  br label %bb3
bb2:
  ; This store is redundant
  store i32 %l2, i32* %1, align 4
  br label %bb3
bb3:
  ret i32 0
}

Differential Revision: http://reviews.llvm.org/D11854

llvm-svn: 244901
2015-08-13 15:36:11 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IPO Enable EliminateAvailableExternally pass in the LTO pipeline. 2015-08-11 16:26:41 +00:00
InstCombine [InstCombinePHI] Partial simplification of identity operations. 2015-08-13 12:38:58 +00:00
Instrumentation [libFuzzer] don't crash if the condition in a switch has unusual type (e.g. i72) 2015-08-11 00:24:39 +00:00
ObjCARC Fix some comment typos. 2015-08-08 18:27:36 +00:00
Scalar [DeadStoreElimination] remove a redundant store even if the load is in a different block. 2015-08-13 15:36:11 +00:00
Utils fix typo; NFC 2015-08-12 20:36:18 +00:00
Vectorize [PM/AA] Explicitly depend on TLI rather than getting it out of the 2015-08-12 18:06:08 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile