RFR: 8245452: Clean up compressed pointer logic in lcm.cpp

Erik Österlund erik.osterlund at oracle.com
Wed May 27 13:14:39 UTC 2020


Hi,

After my change enabling compressed class pointers when compressed oops 
is disabled,
Vladimir Kozlov pointed out that there is potential for simplifying some 
code in lcm.cpp
that uses various checks if there is any form of compressed class/oop 
pointers with shift 0,
as a way of using either the base->get_ptr_type() or 
base->bottom_type()->is_ptr() of
a base pointer. These tests have always had false positives, where the 
base->get_ptr_type()
is used when there is no way it could be a compressed pointer with shift 0.

This dance is not really necessary if we just use the 
base->get_ptr_type() always, instead of
carefully figuring out when we can use the bottom type. Because it works 
in both cases.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8245452

Webrev:
http://cr.openjdk.java.net/~eosterlund/8245452/webrev.00/

Thanks,
/Erik


More information about the hotspot-compiler-dev mailing list