[PATCH] D153453: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 06:32:46 PDT 2023
nikic 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);
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153453/new/
https://reviews.llvm.org/D153453
More information about the llvm-commits
mailing list