Request for reviews (S): 6814842: Load shortening optimizations

John Rose John.Rose at Sun.COM
Mon Mar 9 12:09:26 PDT 2009


On Mar 9, 2009, at 11:53 AM, Tom Rodriguez wrote:

>> I see.  Sounds like too much work and possible problems for such a  
>> small
>> (probably not very often applied) optimization.  Should I drop it?
>
> I think the bang for the buck is low to change it at the ideal  
> level.  Can't this be addressed in the ad files?  The adds to deal  
> with endianness will get hidden in the encoding so it won't effect  
> alias analysis.

We tried shortening 64- to 32-bit loads once, and we backed off.   
IIRC, there was an interaction with copy coalescing or some other post- 
match logic.  I looked in the old teamware histories, but couldn't  
find evidence of it, so it's just a hazy memory of years ago.

Load shortening might make sense very late, after register allocation,  
near post-allocation copy removal.  At that point, you should be able  
to alter offsets also, so you are not limited just to the word or byte  
which happens to come first in the CPU's endian order.

-- John



More information about the hotspot-compiler-dev mailing list