Commit c5f05f68 by David Malcolm Committed by David Malcolm

Eliminate basic_block_info macro.

gcc/
	* basic-block.h (basic_block_info): Eliminate macro.

	* cfgrtl.c (rtl_create_basic_block): Replace uses of
	basic_block_info with basic_block_info_for_fn, making uses
	of cfun be explicit.
	* tree-cfg.c (build_gimple_cfg, create_bb): Likewise.

From-SVN: r205823
parent 06e28de2
2013-12-09 David Malcolm <dmalcolm@redhat.com> 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
basic_block_info with basic_block_info_for_fn, making uses
of cfun be explicit.
* tree-cfg.c (build_gimple_cfg, create_bb): Likewise.
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (BASIC_BLOCK): Eliminate macro. * basic-block.h (BASIC_BLOCK): Eliminate macro.
* alias.c (init_alias_analysis): Eliminate BASIC_BLOCK macro in * alias.c (init_alias_analysis): Eliminate BASIC_BLOCK macro in
...@@ -327,7 +327,6 @@ struct GTY(()) control_flow_graph { ...@@ -327,7 +327,6 @@ struct GTY(()) control_flow_graph {
((*basic_block_info_for_fn (FN))[(N)] = (BB)) ((*basic_block_info_for_fn (FN))[(N)] = (BB))
/* Defines for textual backward source compatibility. */ /* Defines for textual backward source compatibility. */
#define basic_block_info (cfun->cfg->x_basic_block_info)
#define last_basic_block (cfun->cfg->x_last_basic_block) #define last_basic_block (cfun->cfg->x_last_basic_block)
#define label_to_block_map (cfun->cfg->x_label_to_block_map) #define label_to_block_map (cfun->cfg->x_label_to_block_map)
#define profile_status (cfun->cfg->x_profile_status) #define profile_status (cfun->cfg->x_profile_status)
......
...@@ -355,10 +355,10 @@ rtl_create_basic_block (void *headp, void *endp, basic_block after) ...@@ -355,10 +355,10 @@ rtl_create_basic_block (void *headp, void *endp, basic_block after)
basic_block bb; basic_block bb;
/* Grow the basic block array if needed. */ /* Grow the basic block array if needed. */
if ((size_t) last_basic_block >= basic_block_info->length ()) if ((size_t) last_basic_block >= basic_block_info_for_fn (cfun)->length ())
{ {
size_t new_size = last_basic_block + (last_basic_block + 3) / 4; size_t new_size = last_basic_block + (last_basic_block + 3) / 4;
vec_safe_grow_cleared (basic_block_info, new_size); vec_safe_grow_cleared (basic_block_info_for_fn (cfun), new_size);
} }
n_basic_blocks_for_fn (cfun)++; n_basic_blocks_for_fn (cfun)++;
......
...@@ -242,8 +242,10 @@ build_gimple_cfg (gimple_seq seq) ...@@ -242,8 +242,10 @@ build_gimple_cfg (gimple_seq seq)
create_empty_bb (ENTRY_BLOCK_PTR_FOR_FN (cfun)); create_empty_bb (ENTRY_BLOCK_PTR_FOR_FN (cfun));
/* Adjust the size of the array. */ /* Adjust the size of the array. */
if (basic_block_info->length () < (size_t) n_basic_blocks_for_fn (cfun)) if (basic_block_info_for_fn (cfun)->length ()
vec_safe_grow_cleared (basic_block_info, n_basic_blocks_for_fn (cfun)); < (size_t) n_basic_blocks_for_fn (cfun))
vec_safe_grow_cleared (basic_block_info_for_fn (cfun),
n_basic_blocks_for_fn (cfun));
/* To speed up statement iterator walks, we first purge dead labels. */ /* To speed up statement iterator walks, we first purge dead labels. */
cleanup_dead_labels (); cleanup_dead_labels ();
...@@ -603,10 +605,10 @@ create_bb (void *h, void *e, basic_block after) ...@@ -603,10 +605,10 @@ create_bb (void *h, void *e, basic_block after)
link_block (bb, after); link_block (bb, after);
/* Grow the basic block array if needed. */ /* Grow the basic block array if needed. */
if ((size_t) last_basic_block == basic_block_info->length ()) if ((size_t) last_basic_block == basic_block_info_for_fn (cfun)->length ())
{ {
size_t new_size = last_basic_block + (last_basic_block + 3) / 4; size_t new_size = last_basic_block + (last_basic_block + 3) / 4;
vec_safe_grow_cleared (basic_block_info, new_size); vec_safe_grow_cleared (basic_block_info_for_fn (cfun), new_size);
} }
/* Add the newly created block to the array. */ /* Add the newly created block to the array. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment