[JVMCI] improve speculation encoding

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: hotspot
    • b21

      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).

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

              Created:
              Updated:
              Resolved: