Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-328

Magic array stores are inefficient on IA32

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1000
    • Component/s: Compiler: Optimizing
    • Labels:
      None

      Description

      The magic call to store a primitive at an offset is sub-optimal on IA32. For example, from MMTk's Log:

      VM.barriers.setArrayNoBarrier(buffer, bufferIndex++, c);

      becomes:

      9 int_shl t127i(I) = l124i(I), 1
      10 int_2addrze.ext t128a(Lorg/vmmagic/unboxed/Offset = t127i(I)
      14 short_store 10, l123a([C), t128a(Lorg/vmmagic/unboxed/Offset, <unused>, <unused>

      which becomes:

      14 ia32_mov EAX([C) = <[EAX(Lorg/mmtk/utility/Log;)]+-4>DW (<mem loc: Lorg/mmtk/utility/Log;.buffer>, t450sv(GUARD))
      10 ia32_lea EDX(Lorg/vmmagic/unboxed/Offset = <0+[EDX(I)*2]>DW
      14 ia32_mov <[EAX([C)]+[EDX(Lorg/vmmagic/unboxed/Offset;)]>W = 10

      which could more optimally be:

      14 ia32_mov EAX([C) = <[EAX(Lorg/mmtk/utility/Log;)]+-4>DW (<mem loc: Lorg/mmtk/utility/Log;.buffer>, t450sv(GUARD))
      14 ia32_mov <[EAX([C)]+[EDX(Lorg/vmmagic/unboxed/Offset;)*2]>W = 10

      I believe the easiest way to implement this would be by magic array stores which can directly generate ALOADs in OPT_GenerateMagic.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ianrogers Ian Rogers
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: