[PATCH] D97673: [RFC] [[Coroutine] [Debug] Salvage dbg.values

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 09:36:34 PDT 2021


lxfind added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1315-1331
     TinyPtrVector<DbgDeclareInst *> DIs = FindDbgDeclareUses(Alloca);
     if (!DIs.empty())
       DIBuilder(*Alloca->getModule(),
                 /*AllowUnresolved*/ false)
           .insertDeclare(G, DIs.front()->getVariable(),
                          DIs.front()->getExpression(),
                          DIs.front()->getDebugLoc(), DIs.front());
----------------
I don't know enough about this, but I wonder if these code (handling of dbgdeclare and dbgvalues) could be merged by simply traversing thorough all DVIs in `findDbgUsers` and do a replaceUsesOfWith on each of them?


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list