diff options
author | Steven Bosscher <stevenb@suse.de> | 2005-01-27 16:32:12 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-01-27 16:32:12 +0000 |
commit | 116cb604ccba8dc7fe055e68ba0330edbda9faa6 (patch) | |
tree | dc324f82ea9932fb68be7d5ec9da7f0000e695a7 /gcc | |
parent | 6737ba67d5250258aa08fa779ddac32f8bca6dfb (diff) | |
download | gcc-116cb604ccba8dc7fe055e68ba0330edbda9faa6.zip gcc-116cb604ccba8dc7fe055e68ba0330edbda9faa6.tar.gz gcc-116cb604ccba8dc7fe055e68ba0330edbda9faa6.tar.bz2 |
re PR middle-end/17278 (8% C++ compile-time regression in comparison with 3.4.1 at -O1 optimization level)
PR middle-end/17278
* opts.c (decode_options): Move flag_thread_jumps from -O1 and
higher to -O2 and higher. Likewise for tree PRE.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Only iterate at -O2
and better.
From-SVN: r94325
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/opts.c | 11 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 2 |
3 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02cf5fe..47c180e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-01-27 Steven Bosscher <stevenb@suse.de> + + PR middle-end/17278 + * opts.c (decode_options): Move flag_thread_jumps from -O1 and + higher to -O2 and higher. Likewise for tree PRE. + * tree-ssa-dom.c (tree_ssa_dominator_optimize): Only iterate at -O2 + and better. + 2005-01-27 Ian Lance Taylor <ian@c2micro.com> PR middle-end/19583 @@ -481,7 +481,6 @@ decode_options (unsigned int argc, const char **argv) if (optimize >= 1) { flag_defer_pop = 1; - flag_thread_jumps = 1; #ifdef DELAY_SLOTS flag_delayed_branch = 1; #endif @@ -510,14 +509,12 @@ decode_options (unsigned int argc, const char **argv) the condition is satisfied in the first iteration and therefore to eliminate it. Jump threading handles these cases now. */ flag_tree_ch = 1; - - /* PRE tends to generate bigger code. */ - flag_tree_pre = 1; } } if (optimize >= 2) { + flag_thread_jumps = 1; flag_crossjumping = 1; flag_optimize_sibling_calls = 1; flag_cse_follow_jumps = 1; @@ -540,6 +537,12 @@ decode_options (unsigned int argc, const char **argv) flag_reorder_blocks = 1; flag_reorder_functions = 1; flag_unit_at_a_time = 1; + + if (!optimize_size) + { + /* PRE tends to generate bigger code. */ + flag_tree_pre = 1; + } } if (optimize >= 3) diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index b492949..648ee56 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -479,7 +479,7 @@ tree_ssa_dominator_optimize (void) SSA_NAME_VALUE (name) = NULL; } } - while (cfg_altered); + while (optimize > 1 && cfg_altered); /* Debugging dumps. */ if (dump_file && (dump_flags & TDF_STATS)) |