Thu, 19 Feb 2009 17:38:53 -0800
6802499: EA: assert(false,"unknown node on this path")
Summary: Add missing checks for SCMemProj node in Escape analysis code.
Reviewed-by: never
src/share/vm/opto/escape.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/opto/macro.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/escape.cpp Wed Feb 18 13:53:42 2009 -0800 1.2 +++ b/src/share/vm/opto/escape.cpp Thu Feb 19 17:38:53 2009 -0800 1.3 @@ -756,6 +756,16 @@ 1.4 } else { 1.5 break; 1.6 } 1.7 + } else if (result->Opcode() == Op_SCMemProj) { 1.8 + assert(result->in(0)->is_LoadStore(), "sanity"); 1.9 + const Type *at = phase->type(result->in(0)->in(MemNode::Address)); 1.10 + if (at != Type::TOP) { 1.11 + assert (at->isa_ptr() != NULL, "pointer type required."); 1.12 + int idx = C->get_alias_index(at->is_ptr()); 1.13 + assert(idx != alias_idx, "Object is not scalar replaceable if a LoadStore node access its field"); 1.14 + break; 1.15 + } 1.16 + result = result->in(0)->in(MemNode::Memory); 1.17 } 1.18 } 1.19 if (result->is_Phi()) {
2.1 --- a/src/share/vm/opto/macro.cpp Wed Feb 18 13:53:42 2009 -0800 2.2 +++ b/src/share/vm/opto/macro.cpp Thu Feb 19 17:38:53 2009 -0800 2.3 @@ -250,6 +250,15 @@ 2.4 assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw"); 2.5 } 2.6 mem = mem->in(MemNode::Memory); 2.7 + } else if (mem->Opcode() == Op_SCMemProj) { 2.8 + assert(mem->in(0)->is_LoadStore(), "sanity"); 2.9 + const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr(); 2.10 + int adr_idx = Compile::current()->get_alias_index(atype); 2.11 + if (adr_idx == alias_idx) { 2.12 + assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); 2.13 + return NULL; 2.14 + } 2.15 + mem = mem->in(0)->in(MemNode::Memory); 2.16 } else { 2.17 return mem; 2.18 } 2.19 @@ -329,8 +338,15 @@ 2.20 return NULL; 2.21 } 2.22 values.at_put(j, val); 2.23 + } else if (val->Opcode() == Op_SCMemProj) { 2.24 + assert(val->in(0)->is_LoadStore(), "sanity"); 2.25 + assert(false, "Object is not scalar replaceable if a LoadStore node access its field"); 2.26 + return NULL; 2.27 } else { 2.28 +#ifdef ASSERT 2.29 + val->dump(); 2.30 assert(false, "unknown node on this path"); 2.31 +#endif 2.32 return NULL; // unknown node on this path 2.33 } 2.34 }