[9] RFR(S): 8075798: Allow ADLC register class to depend on runtime conditions also for cisc-spillable classes
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Mar 26 16:37:29 UTC 2015
This looks reasonable. Nicely done, Zoltan.
Thanks,
Vladimir
On 3/26/15 3:00 AM, Zoltán Majó wrote:
> Hi,
>
>
> please review the following patch.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8075798
>
>
> Problem: In .ad files, it is difficult to have register classes that depend on runtime conditions. JDK-7090968 partially
> solves the problem, but it does not work in cases when not only a register mask, but also a
> "stack mask" is generated for a register class (i.e., the register class is "cisc-spillable"). (If a stack mask is
> needed for classes dependant on runtime conditions, the assert on line 155 in src/share/vm/adlc/output_c.cpp fails.)
>
> The goal of this enhancement is to extend ADLC parsing to allow cisc-spillable register classes to depend on runtime
> conditions.
>
>
> Solution: Introduce a new register class, reg_class_dynamic. The new register class is used with the following syntax:
>
> reg_class_dynamic actual_dflt_reg(dflt_reg, low_reg, %{ VM_Version::has_vfp3_32() }% );
>
> where dflt_reg and low_reg are two existing "static" register classes and actual_dflt_reg is the newly defined register
> class.
>
> The functionality of the actual_dflt_reg defined with reg_class_dynamic is equivalent to the existing syntax
>
> reg_class actual_dflt_reg %{
> if (VM_Version::has_vfp3_32()) {
> return DFLT_REG_mask();
> } else {
> return DFLT_LOW_REG_mask();
> }
> }
>
> The difference between the two register class declarations is that the declaration with reg_class_dynamic allows the
> declared register class to be "cisc-spillable", whereas a declaration with reg_class does not. The code attached to a
> reg_class can be, however, more elaborate than a simple if-then-else allowed with reg_class_dynamic.
>
>
> Webrev: http://cr.openjdk.java.net/~zmajo/8075798/webrev.00/
>
>
> Testing:
> - JPRT testing on all supported platforms
> - manual testing on x86_64 with a .ad file that includes a reg_class definition with a code snippet as well as a
> reg_class_dynamic definition.
>
>
> Thank you and best regards,
>
>
> Zoltan
>
More information about the hotspot-compiler-dev
mailing list