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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 18:51:02 PDT 2021


ChuanqiXu added a comment.

In D97673#2703656 <https://reviews.llvm.org/D97673#2703656>, @lxfind wrote:

> In D97673#2700185 <https://reviews.llvm.org/D97673#2700185>, @ChuanqiXu wrote:
>
>> In D97673#2697366 <https://reviews.llvm.org/D97673#2697366>, @lxfind wrote:
>>
>>>> Previously all `dbg.value`s would be lost after CoroSplit pass. `dbg.value` is debug info compiler produced under optimization. This patch wants to remain as many `dbg.value` as possible while it don't want to change the layout of frame for debug info.
>
> Thanks for explaining. It makes sense.
> Does it only happen to parameters, or does it also happen to allocas? (I would be more interested to see how this affects allocas, since parameters are somewhat special)
> And how is this related to O2 <https://reviews.llvm.org/owners/package/2/>?

It happens to all the value possible in the frame including parameters, allocas and other values possible (if any). Since we only collect values who are already in the frame, this patch shouldn't affect any thing.

> And how is this related to O2 <https://reviews.llvm.org/owners/package/2/>?

Since `dbg.value` would be generated with optimization enabled. If optimization isn't enabled, compiler would generates `dbg.declare` as the debug info, which is already handled by previous patches. It is confusing to use O2 <https://reviews.llvm.org/owners/package/2/> here, my bad. I would edit it.


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list