diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b71595f730..502ded7e7c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2013-12-09 David Malcolm + + * 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 * basic-block.h (basic_block_info): Eliminate macro. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 69689f3545a..4ab82890500 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 f11362a6b16..077dca5d63c 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 95585469518..f384b04eb54 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;