[9] RFR(S): 8132457: Unify command-line flags controlling the usage of compiler intrinsics

Zoltán Majó zoltan.majo at oracle.com
Fri Jul 31 10:02:06 UTC 2015


Hi,


please review the following patch for JDK-8132457.

Bug: https://bugs.openjdk.java.net/browse/JDK-8132457

Problem: There are four cases when flags controlling intrinsics for C1 
and C2 behave inconsistently:
1) The DisableIntrinsic flag is C2-specific.
2) The InlineNatives flag disables most but not all intrinsics. Some 
intrinsics (implemented by both C1 and C2) are turned off by 
-XX:-InlineNatives for C1 but are left on for C2.
3) The _getClass intrinsic (implemented by both C1 and C2) is turned off 
by -XX:-InlineClassNatives for C1 and is left unaffected by C2.
4) The _loadfence, _storefence, _fullfence, _compareAndSwapObject, 
_compareAndSwapLong, and _compareAndSwapInt intrinsics are turned off by 
-XX:-InlineUnsafeOps for C2 and are unaffected by C1.


Solution: Unify command-line flags controlling intrinsic processing. 
Processing of command-line flags is now done only in 
vmIntrinsics::is_disabled_by_flags and there is no compiler-specific 
flag processing.

The inconsistencies listed in the problem description were addressed the 
following way:
1) Extend the C1 compiler to consider the DisableIntrinsic flag when 
checking if an intrinsic is available.
2) -XX:-InlineNatives turns off most intrinsics but leaves on some 
intrinsics (the same set of intrinsics are left on for both C1 and C2).
3) -XX:-InlineClassNatives turns off the _getClass intrinsic for both C1 
and C2.
4) -XX:-InlineUnsafeOps turns off the _loadfence, _storefence, 
_fullfence, _compareAndSwapObject,  _compareAndSwapLong, and 
_compareAndSwapInt intrinsics for both C1 and C2.

Webrev:
http://cr.openjdk.java.net/~zmajo/8132457/webrev.00/

Testing:
- JPRT run, testset hotspot, all tests pass;
- all JTREG tests in hotspot/test, all tests pass;
- local testing of DisableIntrinsic with both C1 and C2.

Thank you and best regards,


Zoltan



More information about the hotspot-compiler-dev mailing list