diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-12-20 14:48:34 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2017-12-20 14:48:34 +0000 |
commit | 67a8d7199fe4e474f7bd565161fa2f27d59969fc (patch) | |
tree | 6093bd1b061517b897df00a25e329bbff6c51b48 /gcc/cfgexpand.c | |
parent | 8a91d5455313fb3c4fc07935d848921012cb297f (diff) | |
download | gcc-67a8d7199fe4e474f7bd565161fa2f27d59969fc.zip gcc-67a8d7199fe4e474f7bd565161fa2f27d59969fc.tar.gz gcc-67a8d7199fe4e474f7bd565161fa2f27d59969fc.tar.bz2 |
[SFN] debug markers before labels no more
Make sure that gimple and RTL IRs don't have debug markers before
labels. When we build the CFG, we move labels before any markers
appearing before them. Then, make sure we don't mistakenly
reintroduce them.
This reverts some of the complexity that had been brought about by the
initial SFN patches.
for gcc/ChangeLog
PR bootstrap/83396
* cfgexpand.c (label_rtx_for_bb): Revert SFN changes that
allowed debug stmts before labels.
(expand_gimple_basic_block): Likewise.
* gimple-iterator.c (gimple_find_edge_insert_loc): Likewise.
* gimple-iterator.h (gsi_after_labels): Likewise.
* tree-cfgcleanup (remove_forwarder_block): Likewise, but
rename reused variable, and simplify using gsi_move_before.
* tree-ssa-tail-merge.c (find_duplicate): Likewise.
* tree-cfg.c (make_edges, cleanup_dead_labels): Likewise.
(gimple_can_merge_blocks_p, verify_gimple_in_cfg): Likewise.
(gimple_verify_flow_info, gimple_block_label): Likewise.
(make_blocks): Move debug markers after adjacent labels.
* cfgrtl.c (skip_insns_after_block): Revert SFN changes that
allowed debug insns outside blocks.
* df-scan.c (df_insn_delete): Likewise.
* lra-constraints.c (update_ebb_live_info): Likewise.
* var-tracking.c (get_first_insn, vt_emit_notes): Likewise.
(vt_initialize, delete_vta_debug_insns): Likewise.
(reemit_marker_as_note): Drop BB parm. Adjust callers.
From-SVN: r255895
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index d509326..e616ec1 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2327,9 +2327,6 @@ label_rtx_for_bb (basic_block bb ATTRIBUTE_UNUSED) { glabel *lab_stmt; - if (is_gimple_debug (gsi_stmt (gsi))) - continue; - lab_stmt = dyn_cast <glabel *> (gsi_stmt (gsi)); if (!lab_stmt) break; @@ -5502,16 +5499,14 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) } } - gsi = gsi_start_nondebug (stmts); + gsi = gsi_start (stmts); if (!gsi_end_p (gsi)) { stmt = gsi_stmt (gsi); if (gimple_code (stmt) != GIMPLE_LABEL) stmt = NULL; } - gsi = gsi_start (stmts); - gimple *label_stmt = stmt; rtx_code_label **elt = lab_rtx_for_bb->get (bb); if (stmt || elt) @@ -5522,8 +5517,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) if (stmt) { expand_gimple_stmt (stmt); - if (gsi_stmt (gsi) == stmt) - gsi_next (&gsi); + gsi_next (&gsi); } if (elt) @@ -5549,9 +5543,6 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) stmt = gsi_stmt (gsi); - if (stmt == label_stmt) - continue; - /* If this statement is a non-debug one, and we generate debug insns, then this one might be the last real use of a TERed SSA_NAME, but where there are still some debug uses further |