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

Emanuel Peter epeter at openjdk.org
Thu Jan 25 14:44:42 UTC 2024


On Thu, 25 Jan 2024 14:36:26 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> 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.

So you think this could not be predicated and hoisted out of the loop? That would also be a sad limitation 😞

>> 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.

Maybe have the body of the test put in, and the IR-rules commented out, with a follow-up RFE for investigation, if you think there is something one can do about it?

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

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


More information about the hotspot-compiler-dev mailing list