[all-commits] [llvm/llvm-project] be9889: [MemorySSA] Don't treat lifetime.end as NoAlias
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Feb 4 12:10:41 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be9889b350f47319b795a4a4826b4b0bc190807a
https://github.com/llvm/llvm-project/commit/be9889b350f47319b795a4a4826b4b0bc190807a
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-02-04 (Thu, 04 Feb 2021)
Changed paths:
M llvm/lib/Analysis/MemorySSA.cpp
M llvm/test/Analysis/MemorySSA/lifetime-simple.ll
M llvm/test/Transforms/MemCpyOpt/lifetime.ll
Log Message:
-----------
[MemorySSA] Don't treat lifetime.end as NoAlias
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.
Differential Revision: https://reviews.llvm.org/D95763
More information about the All-commits
mailing list