Rewrite the main DSE loop to be written in terms of reasoning
authorChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2010 07:23:21 +0000 (07:23 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2010 07:23:21 +0000 (07:23 +0000)
commitcf82dc376a11acb1b5d46d56c032bb0b9326c682
tree5465dd3586d482a9c497d0d4a84f94b3d44581b0
parentc413330c99a573ef3ffe80a46400b1d3eca2398d
Rewrite the main DSE loop to be written in terms of reasoning
about pairs of AA::Location's instead of looking for MemDep's
"Def" predicate.  This is more powerful and general, handling
memset/memcpy/store all uniformly, and implementing PR8701 and
probably obsoleting parts of memcpyoptimizer.

This also fixes an obscure bug with init.trampoline and i8
stores, but I'm not surprised it hasn't been hit yet.  Enhancing
init.trampoline to carry the size that it stores would allow
DSE to be much more aggressive about optimizing them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120406 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/MemoryDependenceAnalysis.h
lib/Transforms/Scalar/DeadStoreElimination.cpp
test/Transforms/DeadStoreElimination/simple.ll