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

x86: Optimize stores of zero immediates with r12_heapbase

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • hotspot

      X86 does not have zero register. Except that it does for Hotspot, when compressed oops are enabled and heap base is zero. C2 routinely uses R12 as zero register then. It makes the code considerably more compact.

      We can do the same in MacroAssembler. This would target the stores of known zeroes, which are surprisingly frequent in C1, mostly for zeroing out various JavaThread slots, e.g. for exception handling.

      (We explored, tangentially, freeing R12 when it is zero, only to see that some C2 match rules use it as zero registers, see JDK-8221249. I suspect code density is why I saw some weird regressions back then.)

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: