RFR: 8265711: C1: Intrinsify Class.getModifier method [v2]
yyang at openjdk.java.net
Tue Apr 27 10:43:40 UTC 2021
On Tue, 27 Apr 2021 10:38:24 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> src/hotspot/share/c1/c1_LIRGenerator.cpp line 1333:
>>> 1331: // Checking if it's a java mirror of primitive type
>>> 1332: __ move(new LIR_Address(receiver.result(), java_lang_Class::klass_offset(), T_ADDRESS), temp, info);
>>> 1333: __ cmp(lir_cond_notEqual, temp, LIR_OprFact::metadataConst(0));
>> The previous version of your patch was missing the check for a primitive type. Why did testing not catch this?
>> Also, your PR title is misleading. You are not simply canonicalizing `Class.getModifier.` You are intrinsifying it.
> Because is_intrinsic_support is not aware of the fact that getModifiers is an intrinsic method. So canonicalizer is even not applied.
>> Also, your PR title is misleading. You are not simply canonicalizing Class.getModifier. You are intrinsifying it.
> Yes, exactly. Changed.
With the new IR test framework, these kinds of problem would never happen, we can do verification at IR level.
More information about the hotspot-compiler-dev