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

C2 SuperWord: Aliasing Analysis: newly allocated arrays cannot alias

XMLWordPrintable

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

      This could be done independently, or as a follow-up to JDK-8324751.

      Sometimes, an array is allocated, and then directly some data
      is computed into it from another array that existed before.

      Example:
      short[] res = new short[SIZE];
      for (int i = 1; i < SIZE / 2; i++) {
          res[i] *= shorts[i - 1];
      }

      Currently, we cannot always vectorize because we assume that the
      original and the newly allocated arrays could alias, but that is not
      possible. We should try to detect such newly allocated arrays,
      and remove aliasing edges for them.

      We have to be a little careful with escaping array references though.
      Maybe we can just prove that the original array reference existed
      before the allocation?

            epeter Emanuel Peter
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: