aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.cc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2024-08-14 17:18:32 +0100
committerIain Sandoe <iain@sandoe.co.uk>2024-08-24 19:40:08 +0100
commit6303cd7e41546e95c436bd274cc972674230fe1c (patch)
tree043492d4c4477e35c414b4eb8a89843b776e1623 /gcc/dwarf2codeview.cc
parentd5da5f00d91a8344fdb366c317366bd8e93ad1b8 (diff)
downloadgcc-6303cd7e41546e95c436bd274cc972674230fe1c.zip
gcc-6303cd7e41546e95c436bd274cc972674230fe1c.tar.gz
gcc-6303cd7e41546e95c436bd274cc972674230fe1c.tar.bz2
c++, coroutines: Separate the analysis, ramp and outlined function synthesis.
This change is preparation for fixes to the ramp and codegen to follow. The primary motivation is that we have thee activities; analysis, ramp synthesis and outlined coroutine body synthesis. These are currently carried out in sequence in the 'morph_fn_to_coro' code, which means that we are nesting the synthesis of the outlined coroutine body inside the finish_function call for the original function (which becomes the ramp). The revised code splits the three interests so that the analysis can be used independently by the ramp and body synthesis. This avoids some issues seen with global state that start/finish function use and allows us to use more of the high-level APIs in fixing bugs. The resultant implementation is more self-contained, and has less impact on finish_function. gcc/cp/ChangeLog: * coroutines.cc (struct suspend_point_info, struct param_info, struct local_var_info, struct susp_frame_data, struct local_vars_frame_data): Move to coroutines.h. (build_actor_fn): Use start/finish function APIs. (build_destroy_fn): Likewise. (coro_build_actor_or_destroy_function): No longer mark the actor / destroyer as DECL_COROUTINE_P. (coro_rewrite_function_body): Use class members. (cp_coroutine_transform::wrap_original_function_body): Likewise. (build_ramp_function): Replace by... (cp_coroutine_transform::complete_ramp_function): ...this. (cp_coroutine_transform::cp_coroutine_transform): New. (cp_coroutine_transform::~cp_coroutine_transform): New (morph_fn_to_coro): Replace by... (cp_coroutine_transform::apply_transforms): ...this. (cp_coroutine_transform::finish_transforms): New. * cp-tree.h (morph_fn_to_coro): Remove. * decl.cc (emit_coro_helper): Remove. (finish_function): Revise handling of coroutine transforms. * coroutines.h: New file. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> Co-authored-by: Arsen Arsenović <arsen@aarsen.me>
Diffstat (limited to 'gcc/dwarf2codeview.cc')
0 files changed, 0 insertions, 0 deletions