mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")
Escape Analysis fixes. Reviewed-by: never, rasbold
This commit is contained in:
parent
2d1fcda0d7
commit
50c4a23cac
15 changed files with 1680 additions and 115 deletions
|
@ -94,14 +94,19 @@ Node *MemNode::optimize_simple_memory_chain(Node *mchain, const TypePtr *t_adr,
|
|||
if (tinst == NULL || !tinst->is_known_instance_field())
|
||||
return mchain; // don't try to optimize non-instance types
|
||||
uint instance_id = tinst->instance_id();
|
||||
Node *start_mem = phase->C->start()->proj_out(TypeFunc::Memory);
|
||||
Node *prev = NULL;
|
||||
Node *result = mchain;
|
||||
while (prev != result) {
|
||||
prev = result;
|
||||
if (result == start_mem)
|
||||
break; // hit one of our sentinals
|
||||
// skip over a call which does not affect this memory slice
|
||||
if (result->is_Proj() && result->as_Proj()->_con == TypeFunc::Memory) {
|
||||
Node *proj_in = result->in(0);
|
||||
if (proj_in->is_Call()) {
|
||||
if (proj_in->is_Allocate() && proj_in->_idx == instance_id) {
|
||||
break; // hit one of our sentinals
|
||||
} else if (proj_in->is_Call()) {
|
||||
CallNode *call = proj_in->as_Call();
|
||||
if (!call->may_modify(t_adr, phase)) {
|
||||
result = call->in(TypeFunc::Memory);
|
||||
|
@ -115,6 +120,8 @@ Node *MemNode::optimize_simple_memory_chain(Node *mchain, const TypePtr *t_adr,
|
|||
}
|
||||
} else if (proj_in->is_MemBar()) {
|
||||
result = proj_in->in(TypeFunc::Memory);
|
||||
} else {
|
||||
assert(false, "unexpected projection");
|
||||
}
|
||||
} else if (result->is_MergeMem()) {
|
||||
result = step_through_mergemem(phase, result->as_MergeMem(), t_adr, NULL, tty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue