mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6802499: EA: assert(false,"unknown node on this path")
Add missing checks for SCMemProj node in Escape analysis code. Reviewed-by: never
This commit is contained in:
parent
73e8e582ba
commit
dc3008a513
2 changed files with 26 additions and 0 deletions
|
@ -756,6 +756,16 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (result->Opcode() == Op_SCMemProj) {
|
||||||
|
assert(result->in(0)->is_LoadStore(), "sanity");
|
||||||
|
const Type *at = phase->type(result->in(0)->in(MemNode::Address));
|
||||||
|
if (at != Type::TOP) {
|
||||||
|
assert (at->isa_ptr() != NULL, "pointer type required.");
|
||||||
|
int idx = C->get_alias_index(at->is_ptr());
|
||||||
|
assert(idx != alias_idx, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
result = result->in(0)->in(MemNode::Memory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result->is_Phi()) {
|
if (result->is_Phi()) {
|
||||||
|
|
|
@ -250,6 +250,15 @@ static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_me
|
||||||
assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
|
assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
|
||||||
}
|
}
|
||||||
mem = mem->in(MemNode::Memory);
|
mem = mem->in(MemNode::Memory);
|
||||||
|
} else if (mem->Opcode() == Op_SCMemProj) {
|
||||||
|
assert(mem->in(0)->is_LoadStore(), "sanity");
|
||||||
|
const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr();
|
||||||
|
int adr_idx = Compile::current()->get_alias_index(atype);
|
||||||
|
if (adr_idx == alias_idx) {
|
||||||
|
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
mem = mem->in(0)->in(MemNode::Memory);
|
||||||
} else {
|
} else {
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
@ -329,8 +338,15 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
values.at_put(j, val);
|
values.at_put(j, val);
|
||||||
|
} else if (val->Opcode() == Op_SCMemProj) {
|
||||||
|
assert(val->in(0)->is_LoadStore(), "sanity");
|
||||||
|
assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
|
||||||
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef ASSERT
|
||||||
|
val->dump();
|
||||||
assert(false, "unknown node on this path");
|
assert(false, "unknown node on this path");
|
||||||
|
#endif
|
||||||
return NULL; // unknown node on this path
|
return NULL; // unknown node on this path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue