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

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 21:57:38 PDT 2021


lxfind added a comment.

Also please add tests to cover more types of variables (allocas, spills..)



================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:2319-2327
+  for (auto *Def : FrameData.getAllDefs()) {
+    // We would handle alloca specially.
+    if (isa<AllocaInst>(Def))
+      continue;
+    SmallVector<DbgValueInst *, 16> DVIs;
+    findDbgValues(DVIs, Def);
+    for (auto *DVI : DVIs) {
----------------
I think it's cleaner to move this code into the loop above.
After the check of all users, you can check if FrameData.Spills contains &I, and if so, do this DbgValues thing.


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list