RFR(S): 8240195: some jaotc failures of fastdebug build with specific flags
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Mar 9 15:42:13 UTC 2020
Good.
Thanks,
Vladimir
On 3/9/20 2:10 AM, Roland Westrelin wrote:
>
> Correct webrev is:
>
> http://cr.openjdk.java.net/~roland/8240195/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