diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-09 17:00:30 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-09 17:00:30 +0000 |
commit | 815540dd22f986cd038ba604dc5c9c8c589e7e44 (patch) | |
tree | 3bd1558b7817ffa9d7cbc42664788157968cb92b /gcc/tree-cfg.c | |
parent | c69606c9a8491e6d72531d5ebfb4b6deb7b4d9aa (diff) | |
download | gcc-815540dd22f986cd038ba604dc5c9c8c589e7e44.tar.gz |
* basic-block.h (struct edge_def): Add goto_locus.
* tree-cfg.c (make_goto_expr_edges): Set it.
(disband_implicit_edges): Use it.
* tree-pretty-print.c (dump_implicit_edges): Print it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 65e8e89ab78..d5ff9191d72 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -680,7 +680,8 @@ make_goto_expr_edges (basic_block bb) /* A GOTO to a local label creates normal edges. */ if (simple_goto_p (goto_t)) { - make_edge (bb, label_to_block (dest), EDGE_FALLTHRU); + edge e = make_edge (bb, label_to_block (dest), EDGE_FALLTHRU); + e->goto_locus = EXPR_LOCUS (goto_t); bsi_remove (&last); return; } @@ -2640,8 +2641,7 @@ disband_implicit_edges (void) if (e->flags & EDGE_FALLTHRU) break; - if (!e - || e->dest == bb->next_bb) + if (!e || e->dest == bb->next_bb) continue; if (e->dest == EXIT_BLOCK_PTR) @@ -2658,9 +2658,9 @@ disband_implicit_edges (void) && TREE_CODE (forward) == GOTO_EXPR) label = GOTO_DESTINATION (forward); - bsi_insert_after (&last, - build1 (GOTO_EXPR, void_type_node, label), - BSI_NEW_STMT); + stmt = build1 (GOTO_EXPR, void_type_node, label); + SET_EXPR_LOCUS (stmt, e->goto_locus); + bsi_insert_after (&last, stmt, BSI_NEW_STMT); e->flags &= ~EDGE_FALLTHRU; } } |