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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 23:04:20 PDT 2021


ChuanqiXu added a comment.

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

>> I am not sure if `%0 = bit cast %a to ...` is the majority redundant fields of coroutine frame if we enable this patch. My original idea is to add a rematerialization process to reduce the coroutine frame like register allocation. However, it maybe a little hard and benefit less. It sounds more easy and beneficial to use original pointer by value tracking. Then I think this problem may be  not introduced by this patch. Here is my example:
>>
>>   %0 = bitcast %a to ...
>>   call @llvm.coro.suspend 
>>   ; ....
>>   use of %a
>>   use of %0
>>
>> Then both %a and %0 would be put in the frame, which is totally redundant. We could see if there are examples other than bit cast in other patch.
>
> We already do materialization though. I wonder why that doesn't cover the case? Can we take advantage of that?

Yes, it makes since to cover the case. I would work on this later. Thank you!


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list