-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b78
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8135673 | emb-9 | Zoltan Majo | P4 | Resolved | Fixed | team |
Command-line flags controlling compiler intrinsics should behave consistently between the C1 and C2 compilers. That is, if an intrinsic is implemented by both the C1 and C2 compilers, it should be possible to use the same flag to enable/disable that intrinsics.
Most intrinsic-related flags behave consistently across compilers. SinceJDK-8130832, flag processing is implemented by the vmIntrinsics::is_disabled_by_flags() method that is called by both the C1 and C2 compilers.
In some cases, however, flag behavior differs between C1 and C1:
1) The DisableIntrinsic flag is C2-specific therefore it is currently included in C2Compiler::is_intrinsic_disabled_by_flag.
2) The InlineNatives flag disables most but not all intrinsics. There are some intrinsics (implemented by both C1 and C2) but that -XX:-InlineNatives turns off for C1 but leaves unaffected 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.
The differences are reflected in a compiler-specific flag processing implemented in the C2Compiler::is_intrinsic_disabled_by_flag() (for C2) and in the Compiler::is_intrinsic_disabled_by_flag() (for C1) methods.
The processing of command-line flags controlling compiler intrinsics should be unified. At the end, per-compiler checks should not be required, instead, only the checks implemented by vmIntrinsics should be used.
Most intrinsic-related flags behave consistently across compilers. Since
In some cases, however, flag behavior differs between C1 and C1:
1) The DisableIntrinsic flag is C2-specific therefore it is currently included in C2Compiler::is_intrinsic_disabled_by_flag.
2) The InlineNatives flag disables most but not all intrinsics. There are some intrinsics (implemented by both C1 and C2) but that -XX:-InlineNatives turns off for C1 but leaves unaffected 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.
The differences are reflected in a compiler-specific flag processing implemented in the C2Compiler::is_intrinsic_disabled_by_flag() (for C2) and in the Compiler::is_intrinsic_disabled_by_flag() (for C1) methods.
The processing of command-line flags controlling compiler intrinsics should be unified. At the end, per-compiler checks should not be required, instead, only the checks implemented by vmIntrinsics should be used.
- backported by
-
JDK-8135673 Unify command-line flags controlling the usage of compiler intrinsics
-
- Resolved
-
- relates to
-
JDK-8130832 Extend the WhiteBox API to provide information about the availability of compiler intrinsics
-
- Resolved
-