RFR: 8320649: C2: Optimize scoped values [v15]
Emanuel Peter
epeter at openjdk.org
Thu Apr 18 10:20:08 UTC 2024
On Thu, 18 Apr 2024 09:51:50 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits:
>>
>> - Merge branch 'master' into JDK-8320649
>> - review
>> - test fix
>> - test fix
>> - Merge branch 'master' into JDK-8320649
>> - whitespaces
>> - review
>> - Merge branch 'master' into JDK-8320649
>> - review
>> - 32 bit build fix
>> - ... and 12 more: https://git.openjdk.org/jdk/compare/bfff02ee...a4ffc11e
>
> test/hotspot/jtreg/compiler/c2/irTests/TestScopedValue.java line 24:
>
>> 22: */
>> 23:
>> 24: package compiler.c2.irTests;
>
> Christian and I have discussed this a while back: it would be nicer to put tests where they belong thematically. For example now it would be difficult to find all ScopedValue compiler tests, some are in the `irTests` directory, some elsewhere. Hence, I suggest you put them all under `compiler/scoped_value` or similar.
Where are the already existing ScopedValue tests?
> test/hotspot/jtreg/compiler/c2/irTests/TestScopedValue.java line 137:
>
>> 135: MyDouble sv1 = sv.get();
>> 136: notInlined();
>> 137: MyDouble sv2 = sv.get(); // Doesn't optimize out (load of sv cannot common)
>
> Is this a necessary constraint, or a limitation of the optimization? Please add a corresponding comment. That would be helpful if this test all of the sudden failed the IR rule, and one has to debug.
If this was in a loop, the two `get` would be hoisted, and commoned, right?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1570396797
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1570410765
More information about the hotspot-compiler-dev
mailing list