RFR: 8343685: C2 SuperWord: refactor VPointer with MemPointer [v6]

Emanuel Peter epeter at openjdk.org
Thu Jan 16 06:34:45 UTC 2025


On Wed, 15 Jan 2025 12:58:28 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More fixes for vnkozlov
>
> src/hotspot/share/opto/vectorization.hpp line 1167:
> 
>> 1165:     const VPointer& p1 = s1->vpointer();
>> 1166:     const VPointer& p2 = s2->vpointer();
>> 1167:     bool both_no_invar = p1.count_invar_summands() == 0 &&
> 
> Since you are using `pointer.count_invar_summands()` multiple times in this class, you could provide a `ConstrainedAlignmentSolution::count_invar_summands()` method directly instead of first fetching the `VPointer` from the solution.

I see 3 occurances. In all cases we have the VPointer fetched anyway. For me it is not worth the extra abstraction, but if you insist on it I can of course do it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21926#discussion_r1917817119


More information about the hotspot-compiler-dev mailing list