diff options
author | David Malcolm <dmalcolm@redhat.com> | 2013-12-09 20:28:31 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2013-12-09 20:28:31 +0000 |
commit | 99729d912d29072cc42c361cdc6bed31cb0c0e6b (patch) | |
tree | aba32e7e921db0a872854db5b019149870134e3b | |
parent | c5f05f68b215255ec43de8ddf324b19efaefcd00 (diff) | |
download | gcc-99729d912d29072cc42c361cdc6bed31cb0c0e6b.zip gcc-99729d912d29072cc42c361cdc6bed31cb0c0e6b.tar.gz gcc-99729d912d29072cc42c361cdc6bed31cb0c0e6b.tar.bz2 |
Eliminate label_to_block_map macro.
gcc/
* basic-block.h (label_to_block_map): Eliminate macro.
* gimple.c (gimple_set_bb): Replace uses of label_to_block_map
with uses of label_to_block_map_for_fn, making uses of cfun be
explicit.
* tree-cfg.c (delete_tree_cfg_annotations): Likewise.
(verify_gimple_label): Likewise.
From-SVN: r205824
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/basic-block.h | 1 | ||||
-rw-r--r-- | gcc/gimple.c | 8 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 5 |
4 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b71595..502ded7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2013-12-09 David Malcolm <dmalcolm@redhat.com> + * basic-block.h (label_to_block_map): Eliminate macro. + + * gimple.c (gimple_set_bb): Replace uses of label_to_block_map + with uses of label_to_block_map_for_fn, making uses of cfun be + explicit. + * tree-cfg.c (delete_tree_cfg_annotations): Likewise. + (verify_gimple_label): Likewise. + +2013-12-09 David Malcolm <dmalcolm@redhat.com> + * basic-block.h (basic_block_info): Eliminate macro. * cfgrtl.c (rtl_create_basic_block): Replace uses of diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 69689f3..4ab8289 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -328,7 +328,6 @@ struct GTY(()) control_flow_graph { /* Defines for textual backward source compatibility. */ #define last_basic_block (cfun->cfg->x_last_basic_block) -#define label_to_block_map (cfun->cfg->x_label_to_block_map) #define profile_status (cfun->cfg->x_profile_status) /* For iterating over basic blocks. */ diff --git a/gcc/gimple.c b/gcc/gimple.c index f11362a..077dca5 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1475,17 +1475,19 @@ gimple_set_bb (gimple stmt, basic_block bb) uid = LABEL_DECL_UID (t); if (uid == -1) { - unsigned old_len = vec_safe_length (label_to_block_map); + unsigned old_len = + vec_safe_length (label_to_block_map_for_fn (cfun)); LABEL_DECL_UID (t) = uid = cfun->cfg->last_label_uid++; if (old_len <= (unsigned) uid) { unsigned new_len = 3 * uid / 2 + 1; - vec_safe_grow_cleared (label_to_block_map, new_len); + vec_safe_grow_cleared (label_to_block_map_for_fn (cfun), + new_len); } } - (*label_to_block_map)[uid] = bb; + (*label_to_block_map_for_fn (cfun))[uid] = bb; } } diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 9558546..f384b04 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2379,7 +2379,7 @@ stmt_ends_bb_p (gimple t) void delete_tree_cfg_annotations (void) { - vec_free (label_to_block_map); + vec_free (label_to_block_map_for_fn (cfun)); } @@ -4281,7 +4281,8 @@ verify_gimple_label (gimple stmt) uid = LABEL_DECL_UID (decl); if (cfun->cfg - && (uid == -1 || (*label_to_block_map)[uid] != gimple_bb (stmt))) + && (uid == -1 + || (*label_to_block_map_for_fn (cfun))[uid] != gimple_bb (stmt))) { error ("incorrect entry in label_to_block_map"); err |= true; |