diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-09-28 08:39:25 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2020-09-28 09:32:27 +0200 |
commit | dabef758bfe23d847cb1e2de2d0c0a67a53dc56a (patch) | |
tree | 1d9195ab7550a24d6b81b9a8958d78a8fa571f0f /gcc/tree-eh.c | |
parent | 4383c595ce5cc6ef6bcb45d2c9caf43002afbc4f (diff) | |
download | gcc-dabef758bfe23d847cb1e2de2d0c0a67a53dc56a.zip gcc-dabef758bfe23d847cb1e2de2d0c0a67a53dc56a.tar.gz gcc-dabef758bfe23d847cb1e2de2d0c0a67a53dc56a.tar.bz2 |
Revert recent changes to lower_try_finally_dup_block
This reverts the recent changes made to lower_try_finally_dup_block and
aimed at tweaking the souce location info for __builtin_stack_restore.
gcc/ChangeLog:
* tree-eh.c (lower_try_finally_dup_block): Revert latest change.
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 1376b82..c3314bb 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -899,26 +899,18 @@ lower_try_finally_dup_block (gimple_seq seq, struct leh_state *outer_state, gtry *region = NULL; gimple_seq new_seq; gimple_stmt_iterator gsi; - location_t last_loc = UNKNOWN_LOCATION; new_seq = copy_gimple_seq_and_replace_locals (seq); - for (gsi = gsi_last (new_seq); !gsi_end_p (gsi); gsi_prev (&gsi)) + for (gsi = gsi_start (new_seq); !gsi_end_p (gsi); gsi_next (&gsi)) { gimple *stmt = gsi_stmt (gsi); - /* We duplicate __builtin_stack_restore at -O0 in the hope of eliminating - it on the EH paths. When it is not eliminated, give it the next - location in the sequence or make it transparent in the debug info. */ - if (gimple_call_builtin_p (stmt, BUILT_IN_STACK_RESTORE)) - gimple_set_location (stmt, last_loc); - else if (LOCATION_LOCUS (gimple_location (stmt)) == UNKNOWN_LOCATION) + if (LOCATION_LOCUS (gimple_location (stmt)) == UNKNOWN_LOCATION) { tree block = gimple_block (stmt); gimple_set_location (stmt, loc); gimple_set_block (stmt, block); } - else - last_loc = gimple_location (stmt); } if (outer_state->tf) |