RFR: 8265711: C1: Intrinsify Class.getModifier method [v2]

Yi Yang yyang at openjdk.java.net
Tue Apr 27 10:43:39 UTC 2021

On Tue, 27 Apr 2021 09:58:47 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Yi Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>  - add missing stuff; change according to review comment
>>  - Merge branch 'master' into canon_opt
>>  - canonicalize well-chosen intrinsic methods
> 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.


PR: https://git.openjdk.java.net/jdk/pull/3616

More information about the hotspot-compiler-dev mailing list