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

Generate better decoding code for compressed klass pointers which are constant

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: hs25, 9, 10
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      generic

      Description

      Tom Rodriguez wrote:
      -------------------------------------------------------------
      I was staring at some code and noticed this:

      427 B66: # B128 B67 <- B65 Freq: 0.999982
      427 movl R9, narrowklass: precise klass java/io/DataOutputStream: 0x00007fa2db85f838:Constant:exact * # compressed klass ptr
      42d decode_klass_not_null R9,R9

      which generates this:

       ;; B66: # B128 B67 <- B65 Freq: 0.999982

       0x000000010abd2a47: mov $0x6bca0,%r9d ; {metadata('java/io/DataOutputStream')}
       0x000000010abd2a4d: movabs $0x800000000,%r12
       0x000000010abd2a57: add %r12,%r9
       0x000000010abd2a5a: xor %r12,%r12

      which is a very expensive way to generate a 64 bit constant.
      -------------------------------------------------------------

      We should fold such code on x86 (SPARC is different story) into 64-bit constant load (loadConP) in final_graph_reshape phase.

        Attachments

          Activity

            People

            • Assignee:
              kvn Vladimir Kozlov
              Reporter:
              kvn Vladimir Kozlov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: