[PATCH] D97673: [RFC] [[Coroutine] [Debug] Salvage dbg.value at O2

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 20:55:33 PDT 2021


ChuanqiXu added a comment.

In D97673#2647831 <https://reviews.llvm.org/D97673#2647831>, @jmorse wrote:

> When looping over the debug users of instructions and replacing the dbg.values operands, you should now use the "replaceVariableLocationOp" helper instead -- this avoids re-creating a dbg.value intrinsic, and should handle variadic variable locations (the patches for which are 95% landed) seamlessly.
>
> Overall the aim of the patch makes sense to me, it's storing values used by debug intrinsics in the coroutine frame for later retrieval right? Is there a risk that some later coroutine optimisation will try to optimise the frame and overwrite the stored values-for-debug-users -- this can happen with stack slot colouring at the other end of the compiler.

To my knowledge, if other passes try to optimize the frame, other passes are responsible to maintain the debug information.


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list