RFR(S): 8141137: C2 fails rematerializing nodes using flag registers.
Vladimir Kozlov
vladimir.kozlov at oracle.com
Sat Nov 14 08:29:54 UTC 2015
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