[PATCH] D155406: [MemCpyOpt] implement multi BB stack-move optimization

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 26 13:33:29 PDT 2023


nikic accepted this revision.
nikic added a comment.

LGTM



================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1434
+    if (isa<BasicBlock *>(I1))
+      return I2;
+    if (isa<BasicBlock *>(I2))
----------------
khei4 wrote:
> nikic wrote:
> > Shouldn't this be `I1`?
> In this case, I use BasicBlock to represent the terminator of the block, while it's first non-phi in the PDom. This might be confusing, so I commented on it just in time.
Oh yeah, that makes sense.


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

https://reviews.llvm.org/D155406



More information about the llvm-commits mailing list