[PATCH] D97673: [RFC] [[Coroutine] [Debug] Salvage dbg.values
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 01:51:20 PDT 2021
ChuanqiXu 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);
----------------
lxfind wrote:
> 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);
> ...
> }
> ```
Sorry for not considering the dominator order. The example in the inline comment don't cover the Argument. I prefer to move these codes out of the loop instead of add it here and in the loop traversing arguments. I think it may not be much confusing if we move the codes out of the current loop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97673/new/
https://reviews.llvm.org/D97673
More information about the llvm-commits
mailing list