RFR: 8320649: C2: Optimize scoped values [v4]

Roland Westrelin roland at openjdk.org
Thu Jan 25 14:44:41 UTC 2024


On Tue, 16 Jan 2024 18:35:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Personal wishlist: can you add a case where this optimization enables vectorization? Or do your optimizations happen too late for that?

In its simplest form, a ScopedValue get will have a test (to check it's indeed in the cache) and a load so I don't think vectorization is possible.

> test/hotspot/jtreg/compiler/c2/irTests/TestScopedValue.java line 169:
> 
>> 167:     //     MyLong long2 = (MyLong)scopedValue.get();
>> 168:     //     return long1.getValue() + long2.getValue();
>> 169:     // }
> 
> Are you still working on this?

No. I couldn't make the test work unfortunately, so I wasn't sure whether to leave the test commented out (in case someone revisits that later) or not.

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

PR Comment: https://git.openjdk.org/jdk/pull/16966#issuecomment-1910338270
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1466472279


More information about the hotspot-compiler-dev mailing list