[PATCH] D159075: [MemCpyOpt] implement forward dataflow sensitive stack-move optimization
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 01:22:43 PDT 2023
khei4 added a comment.
Thank you for the review!
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1456
+ Size < 0 || uint64_t(Size) == AllocaSize)
+ return true;
+ } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(II)) {
----------------
nikic wrote:
> Does this actually do anything? It seems like the lifetime handling in CheckModRefConflict will skip this code path already.
> Does this actually do anything? It seems like the lifetime handling in CheckModRefConflict will skip this code path already.
No for current cases, as you see! We can erase this for now. Although conceptually current handling for lifetime intrinsic(completely ignore it and shrinkwrap after that) in CheckModRefConflict seems unique, this `IsDef` concept is not a general method or framework now.
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1503
+// users) complexity.
+bool CheckModRefConflict(BasicBlockInstModRefMap BBInstModRefMap,
+ AllocaInst *AI, Instruction *Store,
----------------
nikic wrote:
> static
>
> Is passing the map by value here intentional?
> Is passing the map by value here intentional?
No. Thanks for good catch!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159075/new/
https://reviews.llvm.org/D159075
More information about the llvm-commits
mailing list