This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: java aliasing rules


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]