This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

-O2 on alphaev6 has big problems


Over the years, I have tried to contribute to gcc development by
testing snapshots and CVS sources.  Over that time, I have seen many
improvements, especially in compile times for large routines.  (Once
the Lengauer/Tarjan dominators calculation in

http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00076.html

goes in, the only compile-time problem I see in C code is gcse, which
is disabled anyway for extreme control flow graphs ;-).  There have
also been many improvements in code generation for the Alpha 21264.

Yet, today, I'm using gcc-2.95.1 (with some back-ported patches from
the CVS sources) on alphaev6-unknown-linux-gnu.  Why?  Because (1) I
can't find a set of optimizations > -O1 that compiles my code correctly
with the CVS sources, and (2) gcc-2.95.1 has some benefits in code
generation on this platform over gcc-2.95.2.

(1) is quite serious.  I have many options about how I generate and
compile the C code, and none of them work.  If, for example, I disable
gcse, then the problem reported in

http://gcc.gnu.org/ml/gcc-prs/2000-q4/msg00208.html

goes away, but there is another segfault a second or so later.  I've
spent days, probably weeks, trying to track down the code generation
bugs, but the only one I've been able to pinpoint is as reported
above.  (As you all know, it's not terribly easy debugging code with
-O2.)

What is somewhat frustrating is that while I can't get the CVS sources
to compile my code correctly at all, I see the results on the test
suite getting better and better.  I ran the test suite last night, only
11 errors on gcc, 8 errors with g++, none with g77.  This compiler must
be nearly perfect, yet it can't compile my code.  Maybe the problems
are hidden in the 80 expected failures in the gcc testsuite or the 103
expected failures in the g++ testsuite.  (Maybe you guys have been too
quick to label errors as expected to fail; are these expected failures
truly put under a spotlight to see how to fix them?)

So, I'm back to using 2.95.1, with top telling me that even with gcse
disabled, it's taking 10 minutes to compile a file that the current CVS
sources compile (incorrectly, anyway) in under 2 minutes.  All those
fixes for compile-time problems (many of which I've pointed out after
profiling) installed in the last year and a half are useless to me
because I'm stuck back in August 1999, the release date for 2.95.1.
Blah.

Back to debugging ...

Brad Lucier

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]