[lworld] RFR: 8254174: [lworld] [lw3] C1 should optimize access to array of empty types

Tobias Hartmann thartmann at openjdk.java.net
Thu Oct 8 08:04:48 UTC 2020


On Wed, 7 Oct 2020 16:02:39 GMT, Frederic Parain <fparain at openjdk.org> wrote:

> Please review these changes adding more optimizations related to empty inline types when accessing flattened arrays.
> 
> Thank you,
> 
> Fred

Looks good to me.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java line 336:

> 334:         e = null;
> 335:         try {
> 336:             EmptyType et  = test11(array, -1);

Extra whitespace before `=`.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java line 343:

> 341:         e = null;
> 342:         try {
> 343:             EmptyType et  = test11(null, 1);

Extra whitespace before `=`.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java line 329:

> 327:         EmptyType[] array = new EmptyType[10];
> 328:         try {
> 329:             EmptyType et  = test11(array, 11);

Extra whitespace before `=`.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1.java line 290:

> 288:
> 289:     // Test optimizations for arrays of empty types
> 290:     // (ead/write are not performed, pre-allocated instance is used for reads)

"ead" -> "read"

-------------

Marked as reviewed by thartmann (Committer).

PR: https://git.openjdk.java.net/valhalla/pull/213



More information about the valhalla-dev mailing list