[PATCH] D153453: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 07:56:22 PDT 2023
khei4 added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1627
+ auto *EndMA = MSSAU->createMemoryAccessAfter(
+ End, LastMA->getDefiningAccess(), LastMA);
+ MSSAU->insertDef(cast<MemoryDef>(EndMA), /*RenameUses=*/true);
----------------
nikic wrote:
> I think for the lifetime.start using getDefiningAccess() is right, as we're inserting it before the access (the new defining access of FirstMA will become the newly inserted MemoryDef). However, I think that for the lifetime.end we need to pass `LastMA` rather than `LastMA->getDefiningAccess()` as the defining access.
Thanks!
> However, I think that for the lifetime.end we need to pass LastMA rather than LastMA->getDefiningAccess() as the defining access.
Hmm, I see all use of `createMemoryAccessAfter` on MemCpyOpt is so, TBH, I didn't get the meaning of defining access, anyway I can try it!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153453/new/
https://reviews.llvm.org/D153453
More information about the llvm-commits
mailing list