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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 12:36:55 PDT 2021


aprantl added a comment.

In D97673#2678499 <https://reviews.llvm.org/D97673#2678499>, @ChuanqiXu wrote:

> In D97673#2677198 <https://reviews.llvm.org/D97673#2677198>, @aprantl wrote:
>
>> I would recommend to pick a name for `-enhance-debug-with-coroutine ` that does not contain `debug`. The name should make clear that this changes codegen, so nobody gets the idea of turning it as part of a -g option. For example, something like `-coroutine-spill-all-locals`.
>
> The accurate semantic for this option is collect values used by dbg.values, which would make coroutine frame get larger in some cases. This option would work only if user turns -g on. The name `-coroutine-spill-all-locals` is not correct and it is hard for me to get a name which shows it would change the codegen and enhance the debugbility. I am wondering if we can remove this option and make collecting values used by dbg.values a default behavior. From our analysis above, it should be unusual to make the coroutine frame larger. @lxfind what's your opinion?

That's just not something allowed by LLVM policy. The presence of `-g` may not affect the generated code. Similarly, the presence or absence of debug intrinsics may not affect the generated code either. Is there a way to control this behavior without relying on debug info? For, example, could we make sure all allocas are spilled, regardless of whether they are referred to by a dbg.declare?


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

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list