[PATCH] D88872: [Coroutines] Refactor/Rewrite Spill and Alloca processing

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 23:28:45 PDT 2020


ChuanqiXu added a comment.

Thanks for your patch! It mentions some bugs about allocas we need to handle in the future.

For this patch, I'm little confusing about why we need to separate alloca from spills. In my mind, a `spill` means something we need to put in the frame. And an alloca which would be in the frame is naturally a spill.  
I think the patch benefits from replacing

  using SpillInfo = SmallVector<Spill, 8>;

to

  using SpillInfo = SmallMapVector<Value *, SmallVector<Instruction *, 2>, 8>;



================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1104
 
-    // If we have not seen this GEP instruction, migrate any dbg.declare from
-    // the alloca to it.
----------------
I'm confusing about the comment. It says it would migrate dbg.declare from alloca. But how could it know the `CurrentValue` must be alloca from the context ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88872



More information about the llvm-commits mailing list