This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: java aliasing rules
- From: Tom Tromey <tromey at redhat dot com>
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Cc: Dan Nicolaescu <dann at godzilla dot ics dot uci dot edu>, java at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: 27 Mar 2002 18:19:59 -0700
- Subject: Re: java aliasing rules
- References: <200203271143.aa05958@gremlin-relay.ics.uci.edu> <3CA25B77.1000108@waitaki.otago.ac.nz>
- Reply-to: tromey at redhat dot com
>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
Bryce> I implemented java_get_alias_set() by simply assigning a new
Bryce> alias set to every unique field, storing it in
Bryce> DECL_POINTER_ALIAS_SET for each FIELD_DECL. This managed to
Bryce> eliminate some redundant loads in my tests, but didn't cause
Bryce> any measurable improvements in benchmark scores so I didn't get
Bryce> too excited about it
This sounds like a nice approach.
My only question is how it handles the length field of an array.
Object[].length and Foo[].length can alias.
But int[].length and Object[].length cannot.
Similarly for the interior of arrays.
Maybe we could squeeze out some tiny percentage improvement by taking
this into account too?
Tom