This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Gcj
- To: green at cygnus dot com
- Subject: Re: Gcj
- From: Anthony Green <green at cygnus dot com>
- Date: Mon, 14 Feb 2000 01:02:31 -0800
- CC: krab at venus dot is dot s dot u-tokyo dot ac dot jp, java-discuss at sourceware dot cygnus dot com
- References: <199907270646.XAA15451@fencer.cygnus.com>
- Reply-to: green at redhat dot com
A few months ago I wrote:
> Another simple trick I'd like to see implemented looks like this...
>
> In a method M, for each class C requiring initialization, have the
> compiler declare a new local called Ci. Instead of unconditional
> calls to the initialization routine, emit them as:
>
> if (! Ci)
> {
> _Jv_InitClass (C);
> Ci = 1;
> }
>
> The compiler will then magically eliminate redundant calls to
> _Jv_InitClass within methods via simple constant propagation. This
> shows up a lot.
I just submitted a patch to do this...
http://gcc.gnu.org/ml/gcc-patches/2000-02/msg00410.html
Once committed -O0 code will be slightly larger and slower, but -O1
will be better.
AG
--
Anthony Green Cygnus Solutions
Sunnyvale, California