[DSE] Factor out common code [NFC]
authorPhilip Reames <listmail@philipreames.com>
Sun, 21 Jan 2018 02:10:54 +0000 (02:10 +0000)
committerPhilip Reames <listmail@philipreames.com>
Sun, 21 Jan 2018 02:10:54 +0000 (02:10 +0000)
commitf57714c3c776b250fd9e96491070ceee3f55735c
tree5fa4701dcc592ad33bf325ca2f1e56958b8e9eff
parent424e7a11749f7a635315874efe86d17304920d96
[DSE] Factor out common code [NFC]

We already had the pointer being stored to in the MemLoc, reuse that code.  In merging cases, it turned out the interface of the getLocForWrite had become inconsitent with other related utilities.  Fix that by making sure the input passes hasAnalyzableWrite as well.

llvm-svn: 323056
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp