[DSE] Call isRemovable() after getLocForWriteEx() (NFCI)
authorNikita Popov <npopov@redhat.com>
Fri, 24 Dec 2021 08:55:44 +0000 (09:55 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 24 Dec 2021 09:01:25 +0000 (10:01 +0100)
commit81d69e1bda9e4b6a83f29ba1f614e43ab4700972
tree701a8a79784d51cfc7da2a578c633352470616ca
parentea2d4c5881373cdc12cb4a9f9b0afa3db86d05c6
[DSE] Call isRemovable() after getLocForWriteEx() (NFCI)

The only non-trivial change here is that the isReadClobber()
check for redundant stores is now on the DefLoc, not the
UpperLoc. This is semantically the right location to use, though
in practice it makes no difference (the locations are either the
same, or the def inst does not read).
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp