RFR: 8343206: Final graph reshaping should not compress abstract or interface class pointers [v4]

Tobias Hartmann thartmann at openjdk.org
Fri Nov 1 06:34:00 UTC 2024


On Thu, 31 Oct 2024 18:33:38 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Moved assert
>
> src/hotspot/share/opto/compile.cpp line 3789:
> 
>> 3787:     const TypePtr* tp = n->as_Type()->type()->make_ptr();
>> 3788:     ciKlass* klass = tp->is_klassptr()->exact_klass();
>> 3789:     assert(!klass->is_interface() && !klass->is_abstract(), "Interface or abstract class pointers should not be compressed");
> 
> Can you make this assert be instead:
> 
> #include "oops/compressedKlass.hpp"
> ...
>  if debug
>   Klass* k = klass->metadata();  // get the real klass
> assert(CompressedKlassPointers::is_encodable(k), "should be encodable");
> endif // debug

Sure, good point. I updated the code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21784#discussion_r1825473202


More information about the hotspot-compiler-dev mailing list