[PATCH] D86651: [MemCpyOpt] Preserve MemorySSA.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 12:23:11 PDT 2020


fhahn created this revision.
fhahn added reviewers: asbirlea, george.burgess.iv.
Herald added subscribers: hiraditya, Prazek.
Herald added a project: LLVM.
fhahn requested review of this revision.

This patch updates MemCpyOpt to preserve MemorySSA. It uses the
MemoryDef at the insertion point of the builder and inserts the new def
after that def.

In some cases, we just modify a memory instruction. In that case, get
the defining access, then remove the memory access and add a new one.
If the defining access is in a different block, insert a new def at the
beginning of the current block, otherwise after the defining access.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86651

Files:
  llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86651.288077.patch
Type: text/x-patch
Size: 14221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200826/7c020657/attachment.bin>


More information about the llvm-commits mailing list