RFR: 8324751: C2 SuperWord: Aliasing Analysis runtime check [v2]

Emanuel Peter epeter at openjdk.org
Sun Aug 3 06:52:51 UTC 2025


On Mon, 28 Jul 2025 09:24:34 GMT, Manuel Hässig <mhaessig 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 190 commits:
>> 
>>  - manual merge with master
>>  - fix include order
>>  - manual merge with master
>>  - rm multiversioning testing
>>  - more comments cleanu
>>  - comment cleanup
>>  - more descriptions / proof
>>  - improve comments
>>  - fix test and code
>>  - small comment addition
>>  - ... and 180 more: https://git.openjdk.org/jdk/compare/f40381e4...d7e856d8
>
> src/hotspot/share/opto/mempointer.hpp line 411:
> 
>> 409: //     Both p and mp have a linear form for v in r:
>> 410: //       p(v)  = p(lo)  - lo * scale_v + iv * scale_v              (Corrolary P)
>> 411: //       mp(v) = mp(lo) - lo * scale_v + iv * scale_v              (Corrolary MP)
> 
> Where does `iv`come from? Is `v==iv`?

Nice catch!

> src/hotspot/share/opto/mempointer.hpp line 444:
> 
>> 442: //              = summand_rest + scale_v * (v0 + stride_v)                       + con
>> 443: //              = summand_rest + scale_v * v0              + scale_v * stride_v * con
>> 444: //              = summand_rest + scale_v * v0              + scale_v * stride_v * con
> 
> Suggestion:
> 
> //              = summand_rest + scale_v * v0              + scale_v * stride_v  + con
> //              = summand_rest + scale_v * v0              + scale_v * stride_v  + con
> 
> These ought to be plusses.

Oh dear, yes!

> src/hotspot/share/opto/mempointer.hpp line 663:
> 
>> 661: };
>> 662: 
>> 663: // The MemPointerSummand is designed to allow the simplification of
> 
> Shouldn't this be `MemPointerRawSummand`?

No. I'm explaining the `MemPointerRawSummand` further below. This section should explain the difference between `MemPointerRawSummand` and `MemPointerSummand`. Maybe I'll try to make it more explicit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2249621210
PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2249622675
PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2249623707


More information about the hotspot-compiler-dev mailing list