diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2021-06-23 08:19:13 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2021-09-03 19:42:09 +0100 |
commit | 88974974d8188cf12e87e4ad3d23a8cbdd557f0e (patch) | |
tree | 3887961d0efd86b465daa4bb5c45b08e64a08ba6 /gcc/tree-ssa-threadbackward.c | |
parent | 6b69bf5729852d0510abbe8e04078ddecef0cf17 (diff) | |
download | gcc-88974974d8188cf12e87e4ad3d23a8cbdd557f0e.zip gcc-88974974d8188cf12e87e4ad3d23a8cbdd557f0e.tar.gz gcc-88974974d8188cf12e87e4ad3d23a8cbdd557f0e.tar.bz2 |
coroutines: Use DECL_VALUE_EXPR instead of rewriting vars.
Variables that need to persist over suspension expressions
must be preserved by being copied into the coroutine frame.
The initial implementations do this manually in the transform
code. However, that has various disadvantages - including
that the debug connections are lost between the original var
and the frame copy.
The revised implementation makes use of DECL_VALUE_EXPRs to
contain the frame offset expressions, so that the original
var names are preserved in the code.
This process is also applied to the function parms which are
always copied to the frame. In this case the decls need to be
copied since they are used in two different contexts during
the re-write (in the building of the ramp function, and in
the actor function itself).
This will assist in improvement of debugging (PR 99215).
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* coroutines.cc (transform_local_var_uses): Record
frame offset expressions as DECL_VALUE_EXPRs instead of
rewriting them.
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
0 files changed, 0 insertions, 0 deletions