RFR: 8343685: C2 SuperWord: refactor VPointer with MemPointer [v4]
Emanuel Peter
epeter at openjdk.org
Tue Jan 14 07:04:44 UTC 2025
On Mon, 13 Jan 2025 19:44:10 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 116 commits:
>>
>> - copyright 2025
>> - Merge branch 'master' into JDK-8343685-VPointer-MemPointer
>> - manual merge
>> - fix printing
>> - rename
>> - fix up print
>> - add TestEquivalentInvariants.java
>> - improve documentation
>> - hide parser via delegation
>> - Merge branch 'master' into JDK-8343685-VPointer-MemPointer
>> - ... and 106 more: https://git.openjdk.org/jdk/compare/84e6432b...b64f9295
>
> src/hotspot/share/opto/mempointer.cpp line 38:
>
>> 36: MemPointer(MemPointerParser::parse(NOT_PRODUCT(trace COMMA)
>> 37: mem,
>> 38: callback)) {}
>
> Again. Why not product argument first?
Ah, here I wanted to do the optional parameter `callback` (default `empty()`). You can only put parameters with default at the last position.
I decided to refactor this with 2 constructors, one with and one without `callback` parameter. The one without just delegates to the one with, passing the default empty parameter. It's a little more code but works.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1914337700
More information about the hotspot-compiler-dev
mailing list