This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Quick Optimization Question
- From: Tom Tromey <tromey at redhat dot com>
- To: gnustuff at thisiscool dot com
- Cc: java at gcc dot gnu dot org
- Date: 28 Mar 2007 10:08:38 -0600
- Subject: Re: Quick Optimization Question
- References: <CAB7DCTPGALHKISOURSP41E062970VP.460a94e5@parallels>
- Reply-to: tromey at redhat dot com
>>>>> "Mohan" == Mohan Embar <gnustuff@thisiscool.com> writes:
Mohan> public static final byte[] FOO = new byte[] {....};
Mohan> ...will gcj know to translate FOO.length into
Mohan> a constant at compile time?
Nope.
There used to be code to do this in some situations but I think it was
removed.
My "invariant hoisting" pass has some of the machinery to fix this.
It just needs to be taught about new[]. However, getting this patch
in may be troublesome.
Tom