[EarlyCSE][OpaquePtr] Check access type when performing DSE
authorArthur Eubanks <aeubanks@google.com>
Thu, 17 Feb 2022 19:18:26 +0000 (11:18 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 17 Feb 2022 19:58:53 +0000 (11:58 -0800)
commitaf6b9939aac065ce19bdaaf9fc54a8368367f33f
treefc4a067ac219dafbe4783e6e4255fa63ce8c2035
parent941f06282a3d304a96c1ea71b335be5fc91d8f7c
[EarlyCSE][OpaquePtr] Check access type when performing DSE

This will bail out on target specific intrinsics. If those are deemed
important enough for EarlyCSE to handle, we can augment MemIntrinsicInfo
with an access type for TargetTransformInfo::getTgtMemIntrinsic() to
handle.

Reviewed By: #opaque-pointers, nikic

Differential Revision: https://reviews.llvm.org/D120077
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/opaque-ptr.ll