[PATCH] D104184: [Coroutine] Properly deal with byval and noalias parameters

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 12:18:21 PDT 2021


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1605
+          Builder.CreateLoad(Def->getType()->getPointerElementType(), Def);
+      Builder.CreateStore(Value, G);
+    } else {
----------------
lxfind wrote:
> ChuanqiXu wrote:
> > lxfind wrote:
> > > efriedma wrote:
> > > > Use memcpy to copy large values; load+store results in very inefficient code.
> > > Good to know. We actually use load+store for all the frame rewrites. We can look at changing all of that in a separate patch.
> > > Use memcpy to copy large values; load+store results in very inefficient code.
> > 
> > Would the successive pass convert load+store to memcpy?
> I think it would
At -O0, we probably end up with a mess.  At higher optimization levels, I think we have some code in instcombine to transform weird load/store operations; not sure if we reliably end up with a memcpy.  In any case, no reason to rely on that transform here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104184



More information about the llvm-commits mailing list