aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-init.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2007-03-23 23:05:28 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2007-03-23 23:05:28 +0000
commitad21dab7f7977e9741b7bdace4645ae365f45b01 (patch)
treea15eb2e5e903aed64b074a1be1be2b4bb4d71136 /gcc/loop-init.c
parent1f93ef9228b60d66677a2880c32c4b78b19400e7 (diff)
downloadgcc-ad21dab7f7977e9741b7bdace4645ae365f45b01.zip
gcc-ad21dab7f7977e9741b7bdace4645ae365f45b01.tar.gz
gcc-ad21dab7f7977e9741b7bdace4645ae365f45b01.tar.bz2
tracer.c (tracer): Don't take FLAGS argument.
* tracer.c (tracer): Don't take FLAGS argument. Assert we are in cfglayout mode. Don't go into and out of cfglayout mode. Link the blocks in the order of the constructed traces. (rest_of_handle_tracer): Adjust call to tracer. * loop-init.c (rtl_loop_init): Assert we are in cfglayout mode. Don't go into cfglayout mode. (rtl_loop_done): Don't go out of cfglayout mode. * cfglayout.c (relink_block_chain): New function, split out from... (fixup_reorder_chain): ...here. Remove redundant checking. (cfg_layout_finalize): Don't clear the header, footer, and aux fields here, move the code to do so to relink_block_chain. Likewise for free_original_copy_tables. * rtl.h (tracer): Update prototype. * bb-reorder.c (reorder_basic_blocks): Don't take FLAGS argument. Assert we are in cfglayout mode. Don't go into and out of cfglayout mode. Use relink_block_chain to serialize the CFG according to the new basic block order. Move targetm.cannot_modify_jumps_p check from here... (gate_handle_reorder_blocks): ...to here. (duplicate_computed_gotos): Move targetm.cannot_modify_jumps_p check from here... (gate_duplicate_computed_gotos): ...to here. (rest_of_handle_reorder_blocks): Don't see if anything has changed, something always changes when going into and out of cfglayout mode. Perform an expensive cfg cleanup while going into cfglayout mode. Always update liveness information on HAVE_conditional_execution targets. Reserialize the basic blocks and go out of cfglayout mode. * reg-stack.c: Include cfglayout.h. (rest_of_handle_stack_regs): Go into and out of cfglayout mode around the call to reorder_basic_blocks. * basic-block.h (reorder_basic_blocks): Update prototype. (relink_block_chain): New prototype. * passes.c (pass_outof_cfg_layout_mode): Move after cse2. From-SVN: r123167
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r--gcc/loop-init.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 3e6d342..f1c3df2 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -171,12 +171,11 @@ struct tree_opt_pass pass_loop2 =
static unsigned int
rtl_loop_init (void)
{
+ gcc_assert (current_ir_type () == IR_RTL_CFGLAYOUT);
+
if (dump_file)
dump_flow_info (dump_file, dump_flags);
- /* Initialize structures for layout changes. */
- cfg_layout_initialize (0);
-
loop_optimizer_init (LOOPS_NORMAL);
return 0;
}
@@ -204,17 +203,9 @@ struct tree_opt_pass pass_rtl_loop_init =
static unsigned int
rtl_loop_done (void)
{
- basic_block bb;
-
loop_optimizer_finalize ();
free_dominance_info (CDI_DOMINATORS);
- /* Finalize layout changes. */
- FOR_EACH_BB (bb)
- if (bb->next_bb != EXIT_BLOCK_PTR)
- bb->aux = bb->next_bb;
- cfg_layout_finalize ();
-
cleanup_cfg (CLEANUP_EXPENSIVE);
delete_trivially_dead_insns (get_insns (), max_reg_num ());
reg_scan (get_insns (), max_reg_num ());