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

Obsolete BranchOnRegister

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 15
    • hotspot
    • None
    • behavioral
    • minimal
    • The flag is unlikely to have been used a lot in the wild, especially on platforms other than Solaris.
    • add/remove/modify command line option
    • Implementation

      Summary

      Obsolete the -XX:+BranchOnRegister flag.

      Problem

      After the removal of Solaris and Sparc in JDK-8241787 the BranchOnRegister flag no longer has any effect and should be removed. Since the flag was only used for Sparc and since all the code it once controlled is now gone the flag will go directly to obsolete, skipping the deprecation step.

      Solution

      The BranchOnRegister flag will be obsoleted, meaning it will still be recognized but a warning will be generated at startup if it is specified on the command line.

      Specification

      Mark the flag as obsoleted:

      diff -r 9207cfe2f936 src/hotspot/share/runtime/arguments.cpp
      --- a/src/hotspot/share/runtime/arguments.cpp   Tue May 26 12:36:59 2020 -0700
      +++ b/src/hotspot/share/runtime/arguments.cpp   Tue May 26 13:37:19 2020 -0700
      @@ -560,6 +560,7 @@
       #endif // !X86
         { "UseAdaptiveGCBoundary",         JDK_Version::undefined(), JDK_Version::jdk(15), JDK_Version::jdk(16) },
         { "MonitorBound",                  JDK_Version::jdk(14),     JDK_Version::jdk(15), JDK_Version::jdk(16) },
      +  { "BranchOnRegister",              JDK_Version::undefined(), JDK_Version::jdk(15), JDK_Version::jdk(16) },
      
       #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
         // These entries will generate build errors.  Their purpose is to test the macros.

      And remove it from the global flags:

      diff -r 9207cfe2f936 src/hotspot/share/opto/c2_globals.hpp
      --- a/src/hotspot/share/opto/c2_globals.hpp     Tue May 26 12:36:59 2020 -0700
      +++ b/src/hotspot/share/opto/c2_globals.hpp     Tue May 26 13:37:19 2020 -0700
      @@ -357,10 +357,6 @@
                 "Limit of ops to make speculative when using CMOVE")              \
                 range(0, max_jint)                                                \
                                                                               \
      -  /* Set BranchOnRegister == false. See 4965987. */                         \
      -  product(bool, BranchOnRegister, false,                                    \
      -          "Use Sparc V9 branch-on-register opcodes")                        \
      -                                                                            \
         product(bool, UseRDPCForConstantTableBase, false,                         \
                 "Use Sparc RDPC instruction for the constant table base.")        \
                                                                               \

            mikael Mikael Vidstedt
            mikael Mikael Vidstedt
            David Holmes, Vladimir Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: