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
This commit is contained in:
parent
c5f05f68b2
commit
99729d912d
@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user