[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:28:48 PDT 2021


lxfind added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:2306
+      llvm::for_each(DVI->location_ops(), [&](Value *V) {
+        if (FrameData.Spills.count(V))
+          FrameData.Spills[V].push_back(DVI);
----------------
This might not work. The iteration of instructions is not guaranteed to be in dominator order.
This part of the code should be:
```
if (FrameData.Spills.count(&I)) {
  SmallVector<DbgValueInst *, 16> DVIs;
  findDbgValues(DVIs, &I);
  ...
}
```


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list