Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8240830: [BACKOUT] 8240195: some jaotc failures of fastdebug build wi…
…th specific flags

Reviewed-by: dcubed
  • Loading branch information
Vladimir Kozlov committed Mar 10, 2020
1 parent 53c6887 commit 39ab07317300445551def9df503d96857000fe1a
@@ -4241,6 +4241,9 @@ int Compile::static_subtype_check(ciKlass* superk, ciKlass* subk) {
// Add a dependency if there is a chance of a later subclass.
dependencies()->assert_leaf_type(ik);
}
if (ik->is_abstract()) {
return SSC_always_false;
}
return SSC_easy_test; // (3) caller can do a simple ptr comparison
}
} else {
@@ -36,14 +36,6 @@ const Type* SubTypeCheckNode::sub(const Type* sub_t, const Type* super_t) const

bool xsubk = sub_t->isa_klassptr() ? sub_t->is_klassptr()->klass_is_exact() : sub_t->is_oopptr()->klass_is_exact();


// Oop can't be a subtype of abstract type that has no subclass.
if (sub_t->isa_oopptr() && superk->is_instance_klass() && superk->is_abstract() &&
!superk->as_instance_klass()->has_subklass()) {
Compile::current()->dependencies()->assert_leaf_type(superk);
return TypeInt::CC_GT;
}

// Similar to logic in CmpPNode::sub()

// Interfaces can't be trusted unless the subclass is an exact
@@ -101,6 +93,9 @@ const Type* SubTypeCheckNode::sub(const Type* sub_t, const Type* super_t) const
}

Node *SubTypeCheckNode::Ideal(PhaseGVN *phase, bool can_reshape) {
// Verify that optimizing the subtype check to a simple code pattern
// when possible would not constant fold better
#ifdef ASSERT
Node* obj_or_subklass = in(ObjOrSubKlass);
Node* superklass = in(SuperKlass);

@@ -117,28 +112,7 @@ Node *SubTypeCheckNode::Ideal(PhaseGVN *phase, bool can_reshape) {
return NULL;
}

Node* addr = NULL;
if (obj_or_subklass->is_DecodeNKlass()) {
if (obj_or_subklass->in(1) != NULL &&
obj_or_subklass->in(1)->Opcode() == Op_LoadNKlass) {
addr = obj_or_subklass->in(1)->in(MemNode::Address);
}
} else if (obj_or_subklass->Opcode() == Op_LoadKlass) {
addr = obj_or_subklass->in(MemNode::Address);
}

if (addr != NULL) {
intptr_t con = 0;
Node* obj = AddPNode::Ideal_base_and_offset(addr, phase, con);
if (con == oopDesc::klass_offset_in_bytes() && obj != NULL && phase->type(obj)->isa_oopptr()) {
set_req(ObjOrSubKlass, obj);
return this;
}
}

// Verify that optimizing the subtype check to a simple code pattern
// when possible would not constant fold better
#ifdef ASSERT
ciKlass* superk = super_t->is_klassptr()->klass();
ciKlass* subk = sub_t->isa_klassptr() ? sub_t->is_klassptr()->klass() : sub_t->is_oopptr()->klass();

This file was deleted.

0 comments on commit 39ab073

Please sign in to comment.