RFR: 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo
Per Liden
pliden at openjdk.java.net
Wed Nov 25 11:07:59 UTC 2020
On Wed, 25 Nov 2020 03:31:36 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> JDK-8188055 added the function Reference.refersTo. For performance, the supporting native methods Reference.refersTo0 and PhantomReference.refersTo0 should be intrinsified by C2.
>
> Initial patch was prepared by @fisk.
>
> Tested hs-tier1-4. Added new compiler tests to test intrinsics.
>
> Ran new test with Shenandoah. Found only one issue. As result I disable PhantomReference::refersTo intrinsic for COOP+ Shenandoah combination. Someone from Shenandoah team have to test changes if that is enough.
src/hotspot/share/opto/library_call.cpp line 5525:
> 5523: Node* LibraryCallKit::load_field_from_object(Node* fromObj, const char* fieldName, const char* fieldTypeString,
> 5524: DecoratorSet decorators = IN_HEAP, bool is_exact = false, bool is_static = false,
> 5525: ciInstanceKlass* fromKls = NULL) {
It looks like the `is_exact` argument here can be removed, as all call-sites use the default value, which is `false`, and the only use of it in the function is this assert, which will never fail.
assert(!is_exact || tinst->klass_is_exact(), "klass not exact");
-------------
PR: https://git.openjdk.java.net/jdk/pull/1425
More information about the core-libs-dev
mailing list