[PATCH] D99179: [RFC] [Coroutines] Enable printing coroutine frame in debugger if program is compiled with -g
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 01:05:40 PDT 2021
ChuanqiXu added a comment.
In D99179#2646825 <https://reviews.llvm.org/D99179#2646825>, @rjmccall wrote:
> Trying to agree on frame layout across multiple passes seems really brittle to me, since nearly any change to the function could trigger a change in the frame layout.
Yeah. There are two assumptions:
- Optimization passes may not transform a struct allocated on the heap.
- If the coroutine frame is Coro-elided to be an alloca, then any optimization passes who transform the alloca is responsible for maintaining the debug information.
To my knowledge, I don't find a pass who would transform a struct allocated on the heap. Then if there would be one, I think this pass is responsible for maintaining the debug information too.
In D99179#2646825 <https://reviews.llvm.org/D99179#2646825>, @rjmccall wrote:
> I assume that DWARF doesn't really have a concept of language-independent or mixed-language types. Maybe generating a C-language DWARF struct to describe the frame layout could be triggered by the presence of C-language debug info?
I guess @aprantl means the way I constructed the frame struct. This patch assumes there would be a promise in the coroutine frame. However, there is no promise in swift or mlir coroutine.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99179/new/
https://reviews.llvm.org/D99179
More information about the llvm-commits
mailing list