RFR (M) 8152753: C1 intrinsics for CompareAndExchange (x86)

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Apr 7 15:34:08 UTC 2016

On 04/07/2016 06:22 PM, Vladimir Ivanov wrote:
> Why did you put the guards in vmIntrinsics::is_disabled_by_flags and not
> Compiler::is_intrinsic_supported?
> vmIntrinsics::is_disabled_by_flags affects both C1 & C2, so you
> effectively completely disable the intrinsics on all non-x86 platforms.
> I suggest to move InlineCompareAndExchange flag into c1_globals.hpp and
> check it in Compiler::is_intrinsic_supported.

I actually did that originally, see:

...but then moved that to vmIntrinsics::is_disabled_by_flags by John's
suggestion -- all flag sensing is done there. It is a matter of
approach, really, and I think current version aligns better with the
existing intrinsic flags.

Non-x86 platforms have not yet implemented CAE intrinsics, and this
forces their hand to implement both C1 and C2 parts before flipping the
platform-dependent flag. Which may or may not be a good thing, but I
don't have preference either way.


> On 4/1/16 5:37 PM, Aleksey Shipilev wrote:
>> On 03/25/2016 07:29 PM, Aleksey Shipilev wrote:
>>> I would like to solicit comments for C1 support for new
>>> Unsafe.compareAndExchange intrinsics (we have support for them in C2).
>>> The rest of new Unsafe methods that are not intrinsified by C1 are
>>> handled by Java fallbacks in Unsafe.java. compareAndExchange cannot be
>>> emulated with existing APIs.
>>> Bug:
>>>    https://bugs.openjdk.java.net/browse/JDK-8152753
>>> Webrev:
>>>    http://cr.openjdk.java.net/~shade/8152753/webrev.00/
>> Update:
>>    http://cr.openjdk.java.net/~shade/8152753/webrev.01/
>> Moved flags sensing to vmIntrinsics::is_disabled_by_flags, and did some
>> other cleanups.
>> Testing: compiler/unsafe regression tests; targeted microbenchmarks; RBT
>> hs-comp testset (some unrelated timeouts on SPARC).
>> Thanks,
>> -Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160407/8ec2a59e/signature.asc>

More information about the hotspot-compiler-dev mailing list