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

Use Inline.When pragma to replace hard-coded arraycopy hack

    Details

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

      Description

      Inlining the outerlevels of arraycopy when more precise type information than java.lang.Object is known for the array arguments is fairly performance critical as it eliminates the long cascade of instanceof tests.

      Currently this is hacked directly into the inliner. The better way to express this is with an Inline.When pragma that says to inline exactly when we have better type information at compile time (thus putting the condition on the source method where it is easier to maintain instead of buried in the opt compiler).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              ianrogers Ian Rogers added a comment -

              I agree, what would the annotation look like? The hack is that we inline if the first argument to arraycopy is anything other than a java.lang.Object, so would the pragma look like:
              @Inline(When.FirstArgumentIsTypeOtherThanObject)
              It's trivial to code this once we have a nice style for the "when".

              Show
              ianrogers Ian Rogers added a comment - I agree, what would the annotation look like? The hack is that we inline if the first argument to arraycopy is anything other than a java.lang.Object, so would the pragma look like: @Inline(When.FirstArgumentIsTypeOtherThanObject) It's trivial to code this once we have a nice style for the "when".

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  dgrove David Grove
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated: