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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 15 18:53:49 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1605
+          Builder.CreateLoad(Def->getType()->getPointerElementType(), Def);
+      Builder.CreateStore(Value, G);
+    } else {
----------------
efriedma wrote:
> 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.
Thanks, I got it.


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