[PATCH] D153453: (WIP)[MemCpyOpt] implement inter-BB stack-move optimization which unify the lifetime overlapped fully copied allocas, the src is never modified or referenced

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 23:40:54 PDT 2023


khei4 updated this revision to Diff 536663.
khei4 marked 7 inline comments as done.
khei4 edited the summary of this revision.
khei4 added a comment.

apply feedbacks

- bailout if allocas, its uses and copies are in the same BB
- use Dom Tree for lifetime.start insertion position
- limit static alloca to avoid stacksave/stackrestore handling
- revert wrong updated hand-written full-match tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153453/new/

https://reviews.llvm.org/D153453

Files:
  llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  llvm/test/Transforms/MemCpyOpt/callslot.ll
  llvm/test/Transforms/MemCpyOpt/memcpy.ll
  llvm/test/Transforms/MemCpyOpt/stack-move.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153453.536663.patch
Type: text/x-patch
Size: 25519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230703/1d12f8d9/attachment-0001.bin>


More information about the llvm-commits mailing list