array bounds checking [Was: need to focus on java performance?]

Tom Tromey tromey@redhat.com
Tue May 23 01:21:00 GMT 2006


I changed the Subject since this is a side plot.

Andrew> The most important thing about gcj performance is that we aren't
Andrew> hampered by a lack of ideas to improve it.  We're hampered by a lack
Andrew> of people to do the work.

Yes, definitely.

Andrew> For example, there is one real piece of low-hanging fruit: array
Andrew> bounds check elimination.  This is 99% done, but it still doesn't work
Andrew> with gcj.  This is because the aliasing code in gcc needs to be made a
Andrew> little bit smarter about handling read-only fields.

I looked into this a few weeks ago.  Instead of trying to figure out
the aliasing code, I just wrote a simple gcj-specific pass that does
a specialized CSE on 'array->length' and 'obj->vtable'.

It turns out that there is a second bug lurking in here -- VRP does
not seem to understand how we cast to unsigned to eliminate a
comparison.

Tom



More information about the Java mailing list