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


Dan Nicolaescu wrote:

>The more general question is if 2 COMPONENT_REFs that refer to classes
>that are in conflicting alias sets (ie alias_sets_conflict_p) alias in
>java. I have a hunch that this might be true, but I don't know enough
>about java to be sure.
>

Right - Aliasing in Java is very simple, because basically there isn't 
any ;-). The only case we need to be careful about is with inheritance 
when two fields in different classes might actually be the same (ie if 
"class second extends first").

I implemented java_get_alias_set() by simply assigning a new alias set 
to every unique field, storing it in DECL_POINTER_ALIAS_SET for each 
FIELD_DECL. This managed to eliminate some redundant loads in my tests, 
but didn't cause any measurable improvements in benchmark scores so I 
didn't get too excited about it, and I didn't get around to submitting 
the patch yet. I'll try it out later on your test case and see what 
happens...

regards

Bryce.



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