comparison src/share/vm/opto/macro.cpp @ 584:49a36a80b0c7

6802499: EA: assert(false,"unknown node on this path") Summary: Add missing checks for SCMemProj node in Escape analysis code. Reviewed-by: never
author kvn
date Thu, 19 Feb 2009 17:38:53 -0800
parents 7fe62bb75bf4
children 523ded093c31
comparison
equal deleted inserted replaced
583:5d75ab5f6698 584:49a36a80b0c7
248 return mem; 248 return mem;
249 } else { 249 } else {
250 assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw"); 250 assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
251 } 251 }
252 mem = mem->in(MemNode::Memory); 252 mem = mem->in(MemNode::Memory);
253 } else if (mem->Opcode() == Op_SCMemProj) {
254 assert(mem->in(0)->is_LoadStore(), "sanity");
255 const TypePtr* atype = mem->in(0)->in(MemNode::Address)->bottom_type()->is_ptr();
256 int adr_idx = Compile::current()->get_alias_index(atype);
257 if (adr_idx == alias_idx) {
258 assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
259 return NULL;
260 }
261 mem = mem->in(0)->in(MemNode::Memory);
253 } else { 262 } else {
254 return mem; 263 return mem;
255 } 264 }
256 assert(mem != orig_mem, "dead memory loop"); 265 assert(mem != orig_mem, "dead memory loop");
257 } 266 }
327 val = value_from_mem_phi(val, ft, phi_type, adr_t, alloc, value_phis, level-1); 336 val = value_from_mem_phi(val, ft, phi_type, adr_t, alloc, value_phis, level-1);
328 if (val == NULL) { 337 if (val == NULL) {
329 return NULL; 338 return NULL;
330 } 339 }
331 values.at_put(j, val); 340 values.at_put(j, val);
341 } else if (val->Opcode() == Op_SCMemProj) {
342 assert(val->in(0)->is_LoadStore(), "sanity");
343 assert(false, "Object is not scalar replaceable if a LoadStore node access its field");
344 return NULL;
332 } else { 345 } else {
346 #ifdef ASSERT
347 val->dump();
333 assert(false, "unknown node on this path"); 348 assert(false, "unknown node on this path");
349 #endif
334 return NULL; // unknown node on this path 350 return NULL; // unknown node on this path
335 } 351 }
336 } 352 }
337 } 353 }
338 // Set Phi's inputs 354 // Set Phi's inputs