RFR(S): 8141137: C2 fails rematerializing nodes using flag registers.
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Nov 17 11:14:52 UTC 2015
Looks good.
I'll push the change today.
Best regards,
Vladimir Ivanov
On 11/16/15 1:53 PM, Lindenmaier, Goetz wrote:
> Hi Vladimir,
>
> thanks for looking at this!
>
> Best regards,
> Goetz.
>
> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Vladimir Kozlov
> Sent: Samstag, 14. November 2015 09:30
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: Re: RFR(S): 8141137: C2 fails rematerializing nodes using flag registers.
>
> Looks reasonable to me.
>
> Thanks,
> Vladimir
>
> On 11/3/15 6:36 AM, Lindenmaier, Goetz wrote:
>> Hi,
>>
>> This change fixes an issue with rematerializing nodes that have a single
>>
>> RegFlags input.
>>
>> http://cr.openjdk.java.net/~goetz/webrevs/8141137-spillFlag/webrev.00/
>>
>> Please review this change. I please need a sponsor.
>>
>> We see assert(false, "attempted to spill a non-spillable item") running jck tests with the ppc64 port.
>>
>> This assertion in get_spillcopy_wide() is reached from split_Rematerialize() that inserts a SpillCopy
>>
>> of kind InputToRematerialization into the prolonged live range. In the opt build this results
>>
>> in a not compilable method.
>>
>> In our case, 'def' is a node consuming a condition register defined by 'in'. Get_spillcopy_wide()
>>
>> aborts because condition registers (Op_RegFlags) can not be spilled.
>>
>> As register allocation can not spill condition registers, it will rematerialize 'in' later on, too.
>>
>> So actually, the SpillCopy in the prolonged live range is not needed.
>>
>> As a fix, we skip adding the SpillCopy in case split_Rematerialze handles an operation consuming a condition register.
>>
>> We only do so, if the 'in' can be rematerialized, too. Else we assert and stop the compilation as before.
>>
>> Also, this change adds code in rematerialize () that avoids that this pattern causes several live ranges to be stretched.
>>
>> (I like a lot the detailed naming of the SpillCopy nodes!)
>>
>> Best regards,
>>
>> Goetz.
>>
More information about the hotspot-compiler-dev
mailing list