[Bug tree-optimization/34265] Missed optimizations
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sat Sep 17 17:53:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34265
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at gcc dot gnu.org,
| |wschmidt at gcc dot gnu.org
--- Comment #36 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-09-17 17:09:59 UTC ---
The pr 34265 and 49006 have been fixed by revision 176984:
Author: wschmidt
Date: Sun Jul 31 18:58:06 2011 UTC (6 weeks, 5 days ago)
Changed paths: 2
Log Message:
2011-07-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/49749
* tree-ssa-reassoc.c (get_rank): New forward declaration.
(PHI_LOOP_BIAS): New macro.
(phi_rank): New function.
(loop_carried_phi): Likewise.
(propagate_rank): Likewise.
(get_rank): Add calls to phi_rank and propagate_rank.
The following table compare the execution time and the line at which the
vectorizer reports the vectorization for the twelve variants described in
comment #34, showing that they are now all vectorized:
revision 176983 176984 178905
num den rot time line time line time line
o o o 2.154s 243 2.154s 243 2.133s 243
u o o 1.973s 243 1.970s 243 2.035s 243
o u o 2.024s 243 2.023s 243 1.977s 243
u u o 3.053s 1.817s 234 1.831s 234
o o u 3.015s 1.839s 234 1.841s 234
u o u 3.030s 1.828s 234 1.816s 234
o u u 3.049s 1.818s 234 1.834s 234
u u u 3.059s 1.820s 234 1.818s 234
o o f 3.010s 1.825s 234 1.822s 234
u o f 3.033s 1.836s 234 1.826s 234
o u f 3.061s 1.814s 234 1.828s 234
u u f 3.058s 1.825s 234 1.812s 234
graphite 1.937s 243 1.938s 243 1.912s 243
(num, den and rot stand for numerator, denominator and rotate respectively; o,
u, and f stand for original, unrolled, and folded.
Since now gcc has (at least for this class of code;) the three properties I
expect from a good optimizer:
(1) it does not destroy the hand optimization I have done;
(2) it optimizes the original code;
(3) it has a consistent behavior across variants;
I think a test should be added to the test suite to check that none of these
properties are lost in future revisions.
More information about the Gcc-bugs
mailing list