RFR: 8287700: C2 Crash running eclipse benchmark from Dacapo
Christian Hagedorn
chagedorn at openjdk.java.net
Tue Jun 7 15:06:05 UTC 2022
On Tue, 7 Jun 2022 07:48:42 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> With 8275201 (C2: hide klass() accessor from TypeOopPtr and typeKlassPtr subclasses), I made the following change to escape.cpp:
>
>
> @@ -2628,7 +2632,7 @@ bool ConnectionGraph::split_AddP(Node *addp, Node *base) {
> // this code branch will go away.
> //
> if (!t->is_known_instance() &&
> - !base_t->klass()->is_subtype_of(t->klass())) {
> + !t->maybe_java_subtype_of(base_t)) {
> return false; // bail out
> }
> const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
> @@ -3312,7 +3316,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist,
> } else {
> tn_t = tn_type->isa_oopptr();
> }
> - if (tn_t != NULL && tinst->klasgs()->is_subtype_of(tn_t->klass())) {
> + if (tn_t != NULL && tn_t->maybe_java_subtype_of(tinst)) {
> if (tn_type->isa_narrowoop()) {
> tn_type = tinst->make_narrowoop();
> } else {
> @@ -3325,7 +3329,7 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *> &alloc_worklist,
> record_for_optimizer(n);
> } else {
> assert(tn_type == TypePtr::NULL_PTR ||
> - tn_t != NULL && !tinst->klass()->is_subtype_of(tn_t->klass()),
> + tn_t != NULL && !tinst->is_java_subtype_of(tn_t),
> "unexpected type");
> continue; // Skip dead path with different type
> }
>
>
> Where I inverted the subtype and supertype in a subtype check (that is `tn_t->maybe_java_subtype_of(tinst)` when it was `tinst->klasgs()->is_subtype_of(tn_t->klass())`) in 2 places for no good reason AFAICT now. The assert used to also test the same condition as the if above but I changed that by mistake. This fixes addresses both issues.
That looks good to me.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/9054
More information about the hotspot-compiler-dev
mailing list