[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
Sun Aug 13 05:44:32 PDT 2023
khei4 marked 2 inline comments as done.
khei4 added a comment.
@vitalybuka Thank you for the review!
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:72
STATISTIC(NumCallSlot, "Number of call slot optimizations performed");
+STATISTIC(NumStackMove, "Number of stack-move optimizations performed");
----------------
vitalybuka wrote:
> misaligned, clang-format please?
I aligned! Thanks!
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1532
+ int64_t Size = cast<ConstantInt>(UI->getOperand(0))->getSExtValue();
+ if (Size < 0 || Size == DestSize) {
+ LifetimeMarkers.push_back(UI);
----------------
vitalybuka wrote:
> why do we need this condition?
This transformation currently sees the full-sized (and not variable) lifetime intrinsics as an ignorable mod, because removing them doesn't change the semantics(but as you say, stack coloring might be affected), same as https://reviews.llvm.org/D140089, but the former patch does have more meaning to the full-sized lifetime intrinsics for liveness analysis.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153453/new/
https://reviews.llvm.org/D153453
More information about the llvm-commits
mailing list