One anomalous -O2 result
Brad Lucier
lucier@math.purdue.edu
Tue Feb 18 19:59:00 GMT 2003
Richard:
With your recent changes to how gcc handles computed gotos, there is
some benefit to using -O2 consistently, both with and without -fschedule-insns.
In the past there were many examples of codes running much slower with
-O2, and -fgcse in particular. I didn't feel that it would be prudent
to compile all my code with -fgcse if, while giving an average speedup,
there was a nontrivial chance that the run-time might double or more.
Well, that doesn't usually happen now; with tests I did with
gcc version 3.4 20030216, there seems to be only one case where code
compiled with gcse takes significantly longer to execute than code
compiled without it; there is a summary table at
http://www.math.purdue.edu/~lucier/gcse-test4.html
where trav1 takes almost twice as long to run when compiled with gcse than
when compiled without.
Since there is really only one anomalous result now, I was wondering if
you might look at it; if you can figure out whether this can be fixed
then I can reasonably enable -O2, or at least -O2 -fnoschedule-insns, for all
my codes. The .i file is at
http://www.math.purdue.edu/~lucier/trav1.i.gz
Brad
More information about the Gcc
mailing list