[PATCH] D96938: [RFC] [Coroutine] [Debug] Insert dbg.declare to entry.resume to print alloca in the coroutine frame under O2

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 18:01:37 PST 2021


ChuanqiXu added a comment.

In D96938#2588966 <https://reviews.llvm.org/D96938#2588966>, @aprantl wrote:

> Thanks for posting your analysis @ChuanqiXu! I would very much prefer to fix the pipeline such that after LowerDbgDeclare does its work the resulting dbg.value can be salvaged. I we can pull that off it would benefit the entire LLVM optimized code debug info story. I'll try to debug what's happening to see how feasible that is.

>From my point of view, the root reason why original version can't work at -O2 is that when the optimization passes (may be not only SROA ) eliminate/transform the alloca, these passes simply replace the value in the related `dbg.declare`/`dbg.value` with `undef`. So `LowerDbgDeclare ` may not be the problem to me. So it seems like we need fix a lot optimization passes. It  looks like a large and hard work.


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

https://reviews.llvm.org/D96938



More information about the llvm-commits mailing list