X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fbb-reorder.c;h=5f7230f9bcf23b6dc134dfbaa09dd2cb61b59415;hp=d1a36c133463d578ec5661fb0eb1a653181c1731;hb=b22f66e203c5928a518440558634496a4ff1b391;hpb=ee4d588d7a0b3430203709f857041dad9b2e2a60 diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index d1a36c13346..5f7230f9bcf 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1,5 +1,5 @@ /* Basic block reordering routines for the GNU compiler. - Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -86,10 +86,6 @@ #include "tree-pass.h" #include "df.h" -#ifndef HAVE_conditional_execution -#define HAVE_conditional_execution 0 -#endif - /* The number of rounds. In most cases there will only be 4 rounds, but when partitioning hot and cold basic blocks into separate sections of the .o file there will be an extra round.*/ @@ -1378,7 +1374,7 @@ fix_up_fall_thru_edges (void) edge_iterator ei; /* Find EDGE_CAN_FALLTHRU edge. */ - FOR_EACH_EDGE (e, ei, cur_bb->succs) + FOR_EACH_EDGE (e, ei, cur_bb->succs) if (e->flags & EDGE_CAN_FALLTHRU) { fall_thru = e; @@ -1420,7 +1416,7 @@ fix_up_fall_thru_edges (void) fall_thru_label = block_label (fall_thru->dest); - if (old_jump && fall_thru_label) + if (old_jump && JUMP_P (old_jump) && fall_thru_label) invert_worked = invert_jump (old_jump, fall_thru_label,0); if (invert_worked) @@ -1442,7 +1438,7 @@ fix_up_fall_thru_edges (void) /* This is the case where both edges out of the basic block are crossing edges. Here we will fix up the fall through edge. The jump edge will be taken care - of later. The EDGE_CROSSING flag of fall_thru edge + of later. The EDGE_CROSSING flag of fall_thru edge is unset before the call to force_nonfallthru function because if a new basic-block is created this edge remains in the current section boundary @@ -1985,7 +1981,9 @@ gate_duplicate_computed_gotos (void) { if (targetm.cannot_modify_jumps_p ()) return false; - return (optimize > 0 && flag_expensive_optimizations); + return (optimize > 0 + && flag_expensive_optimizations + && ! optimize_function_for_size_p (cfun)); } @@ -2076,9 +2074,6 @@ duplicate_computed_gotos (void) || single_pred_p (single_succ (bb))) continue; - if (!optimize_bb_for_size_p (bb)) - continue; - /* The successor block has to be a duplication candidate. */ if (!bitmap_bit_p (candidates, single_succ (bb)->index)) continue; @@ -2297,5 +2292,3 @@ struct rtl_opt_pass pass_partition_blocks = TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */ } }; - -