aboutsummaryrefslogtreecommitdiff
path: root/gcc/tracer.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-07-03 20:40:29 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-07-03 18:40:29 +0000
commitbc35512f0998b6cc547ef6466cd9865c1e927e44 (patch)
tree315cee76b1488868b1d0dacd4aee43ace2470db6 /gcc/tracer.c
parent9b269fc7bc405c83aa1af45680a9e07e35cf2395 (diff)
downloadgcc-bc35512f0998b6cc547ef6466cd9865c1e927e44.zip
gcc-bc35512f0998b6cc547ef6466cd9865c1e927e44.tar.gz
gcc-bc35512f0998b6cc547ef6466cd9865c1e927e44.tar.bz2
basic-block.h (create_basic_block, [...]): Kill.
* basic-block.h (create_basic_block, merge_blocks_nomove): Kill. * cfgcleanup.c (merge_blocks): Rename to merge_blocks_move. (merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps): Use merge_blocks. (try_optimize_cfg): Use merge_blocks_move. * cfgrtl.c (create_basic_block): Rename to rtl_create_basic_block. (merge_blocks_nomove): Rename to rtl_merge_blocks. (cfg_layout_create_basic_block): New. (rtl_can_merge_blocks): New. (cfg_layout_split_block): Do not alloc aux by hand. * cfghooks.h (cfg_hooks): Add create_basic_block, can_merge_blocks_p, merge_blocks. (create_basic_block, can_merge_blocks_p, merge_blocks): New macros. * cfglayout.c (cfg_layout_duplicate_bb): Do not allocate aux by hand. * cfgloopmanip.c (loop_split_edge_with): Likewise. * ifcvt.c (merge_if_block): Use merge_blocks_nomove. * basic-block.h (basic_block_def): Add field 'rbi'. * bb-reorder.c (find_traces, rotate_loop, mark_bb_visited, find_traces_1_round, copy_bb, connect_traces): Update use of rbi. * cfg.c (entry_exit_blocks): Add new field. * cfglayout.c: Include alloc-pool.h; (cfg_layout_pool): New. (record_effective_endpoints, fixup_reorder_chain, fixup_fallthru_exit_predecessor, cfg_layout_duplicate_bb): Update use of rbi. (cfg_layout_initialize_rbi): New function. (cfg_layout_initialize): Use it. (cfg_layout_finalize): Clear rbi fields. * cfglayout.h (RBI): Kill. (cfg_layout_initialize_rbi): Declare. * cfgloopmanip.c (copy_bbs): Use rbi. (record_exit_edges): Likewise. (duplicate_loop_to_header_edge): Likewise. * cfgrtl.c (cfg_layout_create_basic_block): Use cfg_layout_initialize_rbi. (cfg_layout_split_block): Use rbi. (cfg_layout_delete_block): Likewise. * loop-init.c (loop_optimizer_finalize): Likewise. * loop-unswitch.c (unswitch_loop): Likewise. * tracer.c (seen, tail_duplicate, layout_superblocks): Likewise. * cfgrtl.c: Update comments. (try_redirect_by_replacing_jump): New argument. (redirect_branch_edge): Break out from ... (rtl_redirect_edge_and_branch): ... this one. (update_cfg_after_block_merging): Break out from ... (rtl_merge_blocks): ... this one. (cfg_layout_split_edge): New. (cfg_layout_merge_blocks): New. (cfg_layout_can_merge_blocks_p): New. (cfg_layout_redirect_edge_and_branch): Reorganize. (cfg_layout_rtl_cfg_hooks): Fill in. (cfg_layout_delete_block): Kill barriers. * cfganal.c (can_fallthru): Deal with exit blocks * cfglayout.c (cfg_layout_function_header): New function (record_effective_endpoints): Record function header. (fixup_reorder_chain): Fixup dead jumptables; place header * basic-block.h (CLEANUP_CFGLAYOUT): New flag. * bb-reorder.c (cfg_layout_initialize): Update call. * cfgcleanup.c (try_optimize_cfg): Supress optimizations of fallthru edges in cfglayout mode. * cfglayout.c (cleanup_unconditional_jumps): Kill. (cfg_layout_initialize): Kill agrument loops; use cfgcleanup. * cfglayout.h (cfg_layout_initialize): Update prototype. * cfgloop.h (CP_INSIDE_CFGLAYOUT): Kill. * cfgloopmanip.c (loop_split_edge_with): Use split_edge. * flow.c (propagate_block): Do not crash when basic block ends by first insn in the chain. * loop-init.c (loop_optimizer_init): First enter cfglayout mode; later do loop discovery. * tracer.c (tracer): Update call of cfg_layout_initialize. From-SVN: r68899
Diffstat (limited to 'gcc/tracer.c')
-rw-r--r--gcc/tracer.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/tracer.c b/gcc/tracer.c
index ec9b9ba..ba1f09e 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -64,7 +64,7 @@ static int branch_ratio_cutoff;
/* Return true if BB has been seen - it is connected to some trace
already. */
-#define seen(bb) (RBI (bb)->visited || RBI (bb)->next)
+#define seen(bb) (bb->rbi->visited || bb->rbi->next)
/* Return true if we should ignore the basic block for purposes of tracing. */
static bool
@@ -295,8 +295,8 @@ tail_duplicate ()
fprintf (rtl_dump_file, "Duplicated %i as %i [%i]\n",
old->index, bb2->index, bb2->frequency);
}
- RBI (bb)->next = bb2;
- RBI (bb2)->visited = 1;
+ bb->rbi->next = bb2;
+ bb2->rbi->visited = 1;
bb = bb2;
/* In case the trace became infrequent, stop duplicating. */
if (ignore_bb_p (bb))
@@ -330,28 +330,28 @@ layout_superblocks ()
while (bb != EXIT_BLOCK_PTR)
{
edge e, best = NULL;
- while (RBI (end)->next)
- end = RBI (end)->next;
+ while (end->rbi->next)
+ end = end->rbi->next;
for (e = end->succ; e; e = e->succ_next)
if (e->dest != EXIT_BLOCK_PTR
&& e->dest != ENTRY_BLOCK_PTR->succ->dest
- && !RBI (e->dest)->visited
+ && !e->dest->rbi->visited
&& (!best || EDGE_FREQUENCY (e) > EDGE_FREQUENCY (best)))
best = e;
if (best)
{
- RBI (end)->next = best->dest;
- RBI (best->dest)->visited = 1;
+ end->rbi->next = best->dest;
+ best->dest->rbi->visited = 1;
}
else
for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
{
- if (!RBI (bb)->visited)
+ if (!bb->rbi->visited)
{
- RBI (end)->next = bb;
- RBI (bb)->visited = 1;
+ end->rbi->next = bb;
+ bb->rbi->visited = 1;
break;
}
}
@@ -365,7 +365,7 @@ tracer ()
{
if (n_basic_blocks <= 1)
return;
- cfg_layout_initialize (NULL);
+ cfg_layout_initialize ();
mark_dfs_back_edges ();
if (rtl_dump_file)
dump_flow_info (rtl_dump_file);