[PATCH] D95763: [MemorySSA] Don't treat lifetime.end as NoAlias
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 31 09:06:32 PST 2021
nikic created this revision.
nikic added reviewers: asbirlea, fhahn.
Herald added subscribers: george.burgess.iv, hiraditya, Prazek.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
MemorySSA currently treats lifetime.end intrinsics as not aliasing anything. This breaks MemorySSA-based MemCpyOpt, because we'll happily move a read of a pointer below a lifetime.end intrinsic, as no clobber is reported.
I think the MemorySSA modelling here isn't correct. lifetime.end(p) has approximately the same effect as doing a memcpy(p, undef), and should be treated as a clobber.
This patch removes the special handling of lifetime.end, leaving alias analysis to handle it appropriately.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95763
Files:
llvm/lib/Analysis/MemorySSA.cpp
llvm/test/Analysis/MemorySSA/lifetime-simple.ll
llvm/test/Transforms/MemCpyOpt/lifetime.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95763.320359.patch
Type: text/x-patch
Size: 7358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210131/f6f07184/attachment.bin>
More information about the llvm-commits
mailing list