[llvm] [DSE] Consider the aliasing through global variable while checking clobber (PR #120044)

Haopeng Liu via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 21 12:31:13 PST 2024


haopliu wrote:

> I think it's unfortunate to require onlyAccessesInaccessibleMemOrArgMem() for all of the cases, it'll probably prevent a lot of valid DSE. can we be more precise on when we need onlyAccessesInaccessibleMemOrArgMem()? if the pointer hasn't escaped yet then we don't need this restriction

Updated the check to require either the argument is from Alloca that doesn't escape or `CB->onlyAccessesInaccessibleMemOrArgMem`. Otherwise, discard the "initializes" info. 

PTAL, thanks.

https://github.com/llvm/llvm-project/pull/120044


More information about the llvm-commits mailing list