[PATCH] D86859: [Coroutine] Make dealing with alloca spills more robust

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 01:14:48 PDT 2020


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1002
   // the spill slot in the coroutine frame.
   if (MightNeedToCopy) {
     Builder.SetInsertPoint(FramePtr->getNextNode());
----------------
If there is a case:
```
%a = alloca..
%b = bitcast  %a to ...
@coro.begin
// some use of b but no use of a
```
in this case, all the use of `%a` is dominated by Coro.begin, so the variable `MightNeedToCopy` may not be true, then the codes before won't be executed.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86859



More information about the llvm-commits mailing list