-
Enhancement
-
Resolution: Unresolved
-
P4
-
25
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?
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?
- relates to
-
JDK-8324751 C2 SuperWord: Aliasing Analysis runtime check
-
- In Progress
-