On Thu, 12 Sep 2024 10:17:47 GMT, Roberto Castañeda Lozano
<[email protected]> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Revert accidental change of UCOH default
>
> src/hotspot/share/opto/lcm.cpp line 272:
>
>> 270: const TypePtr* tptr;
>> 271: if ((UseCompressedOops || UseCompressedClassPointers) &&
>> 272: (CompressedOops::shift() == 0 ||
>> CompressedKlassPointers::shift() == 0)) {
>
> Could you explain this change? It seems like it may affect C2's implicit null
> check analysis even for `-XX:-UseCompactObjectHeaders`. In particular, for
> the following configurations, the changed condition evaluates to true before
> the change and false after it, regardless of whether
> `UseCompactObjectHeaders` is enabled:
>
> (!UseCompressedOops, UseCompressedClassPointers,
> CompressedKlassPointers::shift() != 0)
> ( UseCompressedOops, !UseCompressedClassPointers, CompressedOops::shift() !=
> 0)
Hi @robcasloz
The `CompressedKlassPointers` utility class is not usable anymore with
`-UseCompressedClassPointers`. One change is that if
`UseCompressedClassPointers` is off, `CompressedKlassPointers` stays
uninitialized. And that makes more sense then to rely on the static
initialization values of `CompressedOops::_shift`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1757126946