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

[JVMCI] improve speculation encoding

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      The encoding of speculations as longs (in jdk.vm.ci.hotspot.HotSpotSpeculationLog.encodeIndexAndLength(int, int)) isn't very efficient. The max value of length is 20 but currently 32 bits is used to store it. Both the index and length could be encoded in 32 bits: 5 bits for the length and 27 bits for the index. The primary advantage of the 32 bit encoding is that the generated code sequence for writing a failed speculation to a thread local can be done with a single store instruction (on x86 at least).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dnsimon Douglas Simon
              Reporter:
              dnsimon Douglas Simon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: