[DSE] Remove no-data-layout-only type-based overlap checking
authorHal Finkel <hfinkel@anl.gov>
Fri, 17 Oct 2014 11:56:00 +0000 (11:56 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 17 Oct 2014 11:56:00 +0000 (11:56 +0000)
commit9d85eff56ac8fbe8f3b9a287ecb95c3c3a371cdd
tree5e7978c834b9801d03e6d8e66aeeafec9eb78964
parentee0f96f00df54901f062cb262bf2c88084800b3c
[DSE] Remove no-data-layout-only type-based overlap checking

DSE's overlap checking contained special logic, used only when no DataLayout
was available, which inferred a complete overwrite when the pointee types were
equal. This logic seems fine for regular loads/stores, but does not work for
memcpy and friends. Instead of fixing this, I'm just removing it.
Philosophically, transformations should not contain enhanced behavior used only
when data layout is lacking (data layout should be strictly additive), and
maintaining these rarely-tested code paths seems not worthwhile at this stage.

Credit to Aliaksei Zasenka for the bug report and the diagnosis. The test case
(slightly reduced from that provided by Aliaksei) replaces the original
contents of test/Transforms/DeadStoreElimination/no-targetdata.ll -- a few
other tests have been updated to have a data layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220035 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/DeadStoreElimination.cpp
test/Analysis/TypeBasedAliasAnalysis/dse.ll
test/Transforms/DeadStoreElimination/const-pointers.ll
test/Transforms/DeadStoreElimination/inst-limits.ll
test/Transforms/DeadStoreElimination/no-targetdata.ll