RFR(S): 8240195: some jaotc failures of fastdebug build with specific flags
Roland Westrelin
rwestrel at redhat.com
Mon Mar 9 09:04:39 UTC 2020
http://cr.openjdk.java.net/~roland/8240676/webrev.00/
8238691 wrongly made all subtype checks with an abstract super class
which has no sub class fail. It's only valid if the subclass is loaded
from an oop because no oop of an abstract class can be allocated.
On an:
obj instanceof klass
subtype check, the SubTypeCheckNode is created with a direct edge to
the obj node.
So to distinguish:
obj instanceof abstractKlass
from:
abstractKlass.class.isAssignableFrom(c)
all that is needed is to check whether the input to the SubTypeCheckNode
is an oop.
There's one exception to this, thought. Exception handling sometimes
create the following pattern:
(SubTypeCheck (LoadKlass obj) ...)
which must be transformed to:
(SubTypeCheck obj ...)
first in order to not miss an constant folding opportunity. I added that
transformation in SubTypeCheckNode::Ideal().
Roland.
More information about the hotspot-compiler-dev
mailing list