From: Richard Henderson Date: Sun, 15 Jul 2001 15:47:05 +0000 (-0700) Subject: flow.c (redirect_edge_and_branch_force): Initialize global_live_at_start and global_l... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c319629b9a95ef4d8382cb86647589ee06f837d1;p=platform%2Fupstream%2Fgcc.git flow.c (redirect_edge_and_branch_force): Initialize global_live_at_start and global_live_at_end. * flow.c (redirect_edge_and_branch_force): Initialize global_live_at_start and global_live_at_end. (allocate_bb_life_data): Export. * basic-block.h (allocate_bb_life_data): Declare it. * toplev.c (rest_of_compilation): Call it. From-SVN: r44023 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9f6acd..9076102 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2001-07-15 Richard Henderson + * flow.c (redirect_edge_and_branch_force): Initialize + global_live_at_start and global_live_at_end. + (allocate_bb_life_data): Export. + * basic-block.h (allocate_bb_life_data): Declare. + * toplev.c (rest_of_compilation): Call it. + +2001-07-15 Richard Henderson + * config/alpha/alpha.c (alpha_tablejump_addr_vec): New. (alpha_tablejump_best_label): New. * config/alpha/alpha-protos.h: Declare them. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index fc59073..656c13b 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -593,6 +593,7 @@ extern void debug_bb_n PARAMS ((int)); extern void dump_regset PARAMS ((regset, FILE *)); extern void debug_regset PARAMS ((regset)); extern void allocate_reg_life_data PARAMS ((void)); +extern void allocate_bb_life_data PARAMS ((void)); extern void find_unreachable_blocks PARAMS ((void)); /* This function is always defined so it can be called from the diff --git a/gcc/flow.c b/gcc/flow.c index ecaf9ea..56b40f0 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -483,7 +483,6 @@ static void flow_loop_tree_node_add PARAMS ((struct loop *, struct loop *)); static void flow_loops_tree_build PARAMS ((struct loops *)); static int flow_loop_level_compute PARAMS ((struct loop *, int)); static int flow_loops_level_compute PARAMS ((struct loops *)); -static void allocate_bb_life_data PARAMS ((void)); static void find_sub_basic_blocks PARAMS ((basic_block)); static bool redirect_edge_and_branch PARAMS ((edge, basic_block)); static basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block)); @@ -1933,6 +1932,15 @@ redirect_edge_and_branch_force (e, target) new_edge->probability = e->probability; new_edge->count = e->count; + if (e->dest->global_live_at_start) + { + new_bb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&flow_obstack); + new_bb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&flow_obstack); + COPY_REG_SET (new_bb->global_live_at_start, + e->dest->global_live_at_start); + COPY_REG_SET (new_bb->global_live_at_end, new_bb->global_live_at_start); + } + /* Wire edge in. */ new_edge->src = e->src; new_edge->dest = new_bb; @@ -4675,7 +4683,7 @@ calculate_global_regs_live (blocks_in, blocks_out, flags) /* Allocate the permanent data structures that represent the results of life analysis. Not static since used also for stupid life analysis. */ -static void +void allocate_bb_life_data () { register int i; diff --git a/gcc/toplev.c b/gcc/toplev.c index 4161872..b3154dc 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3371,6 +3371,7 @@ rest_of_compilation (decl) without updating life info can wind up with Wierd Stuff in global_live_at_end. We then run sched1, which updates things properly, discovers the wierdness and aborts. */ + allocate_bb_life_data (); update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES, PROP_DEATH_NOTES | PROP_KILL_DEAD_CODE | PROP_SCAN_DEAD_CODE);