Oddity in gcj output
Tom Tromey
tromey@redhat.com
Fri Aug 3 16:52:00 GMT 2001
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
More information about the Java
mailing list