[14] RFR (S): 8234387: C2: Better support of operands with multiple match rules in AD files
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Wed Nov 20 11:09:30 UTC 2019
Hi Dean,
Actually there are many operands declared with multiple match rules.
The one which is hit the hardest (matching failures) is being added by
8234391 [1]:
+operand vec() %{
+ constraint(ALLOC_IN_RC(dynamic));
+ match(VecX);
+ match(VecY);
+ match(VecZ);
+ match(VecS);
+ match(VecD);
+
+ format %{ %}
+ interface(REG_INTER);
+%}
But there are existing operand declarations which are affected:
operand rRegP()
%{
constraint(ALLOC_IN_RC(ptr_reg));
match(RegP);
match(rax_RegP);
match(rbx_RegP);
match(rdi_RegP);
match(rsi_RegP);
match(rbp_RegP); // See Q&A below about
match(r15_RegP); // r15_RegP and rbp_RegP.
format %{ %}
interface(REG_INTER);
%}
There was no rbp_RegP operand declared and ADLC didn't notice it since
it didn't enumerate all the match rules.
Best regards,
Vladimir Ivanov
[1]
https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2019-November/036016.html
On 20.11.2019 01:16, dean.long at oracle.com wrote:
> Hi Vladimir. The change seems to be doing what you describe, however
> for my curiosity, could you give an example of an operand with multiple
> match rules?
>
> dl
>
> On 11/19/19 5:00 AM, Vladimir Ivanov wrote:
>> http://cr.openjdk.java.net/~vlivanov/jbhateja/8234387/webrev.00
>> https://bugs.openjdk.java.net/browse/JDK-8234387
>>
>> Though ADLC accepts operands with multiple match rules, it doesn't
>> generate correct code to handle them except the first one.
>>
>> It doesn't cause any noticeable problems for existing code, but is a
>> major limitation for generic vector operands (JDK-8234391 [1]).
>>
>> Proposed fix enumerates all match rules.
>>
>> Fixed some missing declarations along the way.
>>
>> Contributed-by: Jatin Bhateja <jatin.bhateja at intel.com>
>> Reviewed-by: vlivanov, sviswanathan, ?
>>
>> Testing: tier1-4 (both with and without generic vectors)
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8234391
>
More information about the hotspot-compiler-dev
mailing list