LRB and 32-bit compressed oops
Roman Kennke
rkennke at redhat.com
Tue Mar 26 08:03:52 UTC 2019
>> I know that C2 can handle instructions like:
>>
>> match(Set src (DecodeN src));
>>
>> I have done this in my nofwdptr patch. However, I suspect this may not
>> be possible here because of different reg types.
>>
>> Roland my know more? (Looping in...)
>
> Yeah, it has to happen before regalloc. I am thinking maybe DecodeNNode::Ideal should skip DecodeN
> when oop shift is null? But the input is probably LoadN, which is of wrong type (narrowoop), while
> we need just oop.
No matter what you do, I don't think there is a way in C2 to treat rRegP
and rRegN equivalent. Which means, you need some sort of cast, which may
involve a mov.
However, I guess the real question is, why does it want to preserve the
N register. And why is it apparently doing the decode 2x later, when
using the oop.
It should see that the compressed oop is only used once (at the decode
site), then 'decode' it once (ideally into the same register, because
the original one is not needed anymore, thus avoiding the mov), and then
use that subsequently.
Roman
More information about the shenandoah-dev
mailing list