[DSE] Check for noalias calls rather than alloc functions
authorNikita Popov <npopov@redhat.com>
Tue, 11 Jan 2022 11:08:44 +0000 (12:08 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 11 Jan 2022 11:22:16 +0000 (12:22 +0100)
commit3cef3cf02f09e397c471cf008060c89b34951959
tree0dc878c7ce347820f77e0f69bfc9e5e176d7be3f
parentec016681d33f6f448207ca6b588783697326cb00
[DSE] Check for noalias calls rather than alloc functions

For these "visible on unwind/ret" checks we only care about the
fact that no other code has access to the pointer (unless it
escapes). A noalias call is sufficient for this, it does not
have to be a known allocation function.

This is basically the same change as D116728, but for DSE rather
than LICM.
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/test/Transforms/DeadStoreElimination/simple.ll