diff options
author | Richard Biener <rguenther@suse.de> | 2014-01-15 08:47:30 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-01-15 08:47:30 +0000 |
commit | 95cb86978721e08640cdad52fa5c54409ad6488c (patch) | |
tree | eb095a46488fa76a8001e7482f9f1466118efe39 | |
parent | cb4b6d170652b99b8aee2430737051cdc42b5517 (diff) | |
download | gcc-95cb86978721e08640cdad52fa5c54409ad6488c.zip gcc-95cb86978721e08640cdad52fa5c54409ad6488c.tar.gz gcc-95cb86978721e08640cdad52fa5c54409ad6488c.tar.bz2 |
re PR rtl-optimization/59802 (excessive compile time in RTL optimizers (loop unswitching, CPROP))
2014-01-15 Richard Biener <rguenther@suse.de>
PR rtl-optimization/59802
* lcm.c (compute_available): Use inverted postorder to seed
the initial worklist.
From-SVN: r206624
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lcm.c | 12 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42c1344..aa7109f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-01-15 Richard Biener <rguenther@suse.de> + + PR rtl-optimization/59802 + * lcm.c (compute_available): Use inverted postorder to seed + the initial worklist. + 2014-01-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * config/s390/s390.c (s390_preferred_reload_class): Don't return @@ -496,12 +496,20 @@ compute_available (sbitmap *avloc, sbitmap *kill, sbitmap *avout, bitmap_vector_ones (avout, last_basic_block_for_fn (cfun)); /* Put every block on the worklist; this is necessary because of the - optimistic initialization of AVOUT above. */ - FOR_EACH_BB_FN (bb, cfun) + optimistic initialization of AVOUT above. Use inverted postorder + to make the dataflow problem require less iterations. */ + int *postorder = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); + int postorder_num = inverted_post_order_compute (postorder); + for (int i = 0; i < postorder_num; ++i) { + bb = BASIC_BLOCK_FOR_FN (cfun, postorder[i]); + if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun) + || bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)) + continue; *qin++ = bb; bb->aux = bb; } + free (postorder); qin = worklist; qend = &worklist[n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS]; |