RFR: 8324751: C2 SuperWord: Aliasing Analysis runtime check [v5]
Manuel Hässig
mhaessig at openjdk.org
Mon Aug 4 10:27:00 UTC 2025
On Sun, 3 Aug 2025 06:59:07 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/mempointer.hpp line 731:
>>
>>> 729: }
>>> 730:
>>> 731: bool is_valid() const { return _int_group >= 0; }
>>
>> Why is _int_group not a `uint` if it is always positive or 0?
>
> I don't think it matters too much here. But I do use this as the `is_valid` flag, and I do create invalid summands with the default constructor like this:
> `MemPointerRawSummand(nullptr, NoOverflowInt::make_NaN(), NoOverflowInt::make_NaN(), -1) {}`
>
> Do you see an issue with this, or a significant inefficiency?
No, I just did not catch the -1 in the default constructor and was wondering if `is_valid()` could be dropped by just using an unsigned type. All good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2251061866
More information about the hotspot-compiler-dev
mailing list