This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Oddity in gcj output
- To: Java Discuss List <java at gcc dot gnu dot org>
- Subject: Oddity in gcj output
- From: Tom Tromey <tromey at redhat dot com>
- Date: 03 Aug 2001 18:21:38 -0600
- Cc: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Reply-To: tromey at redhat dot com
I was looking at Bill Bland's performance problem and I noticed that
gcj will generate assembly like this:
.L110:
call _Jv_ThrowNullPointerException
.p2align 4,,15
.L111:
movl %edx, (%esp)
call _Jv_ThrowBadArrayIndex
.p2align 4,,15
.L112:
call _Jv_ThrowNullPointerException
.p2align 4,,15
.L113:
movl %edx, (%esp)
call _Jv_ThrowBadArrayIndex
.p2align 4,,15
.L114:
call _Jv_ThrowNullPointerException
.p2align 4,,15
.L115:
movl %edx, (%esp)
call _Jv_ThrowBadArrayIndex
.p2align 4,,15
.L116:
call _Jv_ThrowNullPointerException
.p2align 4,,15
.L117:
movl %edx, (%esp)
call _Jv_ThrowBadArrayIndex
Surely there's no need for all these calls. We could just make one of
each per method (or maybe even per compilation unit).
Maybe this is an optimization that the middle end ought to be able to
make? I really don't know.
In this case I built Bill's source with `-O2 -g0 -S'.
Tom