diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2010-01-10 23:31:30 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2010-01-10 23:31:30 +0000 |
commit | c21f33b6cba88a7a5369829e72631f221b7f8cc8 (patch) | |
tree | 99d562cb10527a7d867cdb389c6aa26088cd6fc8 | |
parent | e1496917f1a8651786675c13c702de19518cf8e4 (diff) | |
download | gcc-c21f33b6cba88a7a5369829e72631f221b7f8cc8.zip gcc-c21f33b6cba88a7a5369829e72631f221b7f8cc8.tar.gz gcc-c21f33b6cba88a7a5369829e72631f221b7f8cc8.tar.bz2 |
re PR rtl-optimization/42621 (Computed gotos on AMD 800% slower)
PR rtl-optimization/42621
* bb-reorder.c (gate_duplicated_computed_gotos): Only run if not
optimizing for size.
(duplicate_computed_gotos): Remove now-redundant check.
From-SVN: r155796
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/bb-reorder.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 708befd..9761902 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-01-10 Steven Bosscher <steven@gcc.gnu.org> + + PR rtl-optimization/42621 + * bb-reorder.c (gate_duplicated_computed_gotos): Only run if not + optimizing for size. + (duplicate_computed_gotos): Remove now-redundant check. + 2010-01-10 Steve Ellcey <sje@cup.hp.com> PR target/37454 diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 561d7d0..ebbd517 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1981,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)); } @@ -2072,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; |