remove a bit of incorrect code that tried to be tricky about speeding up
authorChris Lattner <sabre@nondot.org>
Sun, 30 Nov 2008 01:09:30 +0000 (01:09 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 30 Nov 2008 01:09:30 +0000 (01:09 +0000)
commit125ce362693350ebe713b58c92a9c0ced26680ea
tree1e6361ec992e185b1d495752b79c774aa11327d2
parentb9118246201592e7e6c1353a09f69e8a4d469d9d
remove a bit of incorrect code that tried to be tricky about speeding up
dependencies.  The basic situation was this: consider if we had:

  store1
  ...
  store2
  ...
  store3

Where memdep thinks that store3 depends on store2 and store2 depends
on store1.  The problem happens when we delete store2: The code in
question was updating dep info for store3 to be store1.  This is a
spiffy optimization, but is not safe at all, because aliasing isn't
transitive.  This bug isn't exposed today with DSE because DSE will only
zap store2 if it is identifical to store 3, and in this case, it is
safe to update it to depend on store1.  However, memcpyopt is not so
fortunate, which is presumably why the "dropInstruction" code used to
exist.

Since this doesn't actually provide a speedup in practice, just rip the
code out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60263 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemoryDependenceAnalysis.cpp