Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132457

Unify command-line flags controlling the usage of compiler intrinsics



    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • hotspot
    • b78



        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. Since JDK-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.


          Issue Links



                zmajo Zoltan Majo (Inactive)
                zmajo Zoltan Majo (Inactive)
                0 Vote for this issue
                2 Start watching this issue