Mercurial > hg > truffle
comparison src/share/vm/opto/macro.cpp @ 3788:e3cbc9ddd434
7044738: Loop unroll optimization causes incorrect result
Summary: take into account memory dependencies when clonning nodes in clone_up_backedge_goo().
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 28 Jun 2011 15:24:29 -0700 |
parents | 642c68c75db9 |
children | f1c12354c3f7 |
comparison
equal
deleted
inserted
replaced
3787:6ae7a1561b53 | 3788:e3cbc9ddd434 |
---|---|
389 phi->as_Phi()->is_same_inst_field(phi_type, instance_id, alias_idx, offset)) { | 389 phi->as_Phi()->is_same_inst_field(phi_type, instance_id, alias_idx, offset)) { |
390 return phi; | 390 return phi; |
391 } | 391 } |
392 } | 392 } |
393 // Check if an appropriate new value phi already exists. | 393 // Check if an appropriate new value phi already exists. |
394 Node* new_phi = NULL; | 394 Node* new_phi = value_phis->find(mem->_idx); |
395 uint size = value_phis->size(); | 395 if (new_phi != NULL) |
396 for (uint i=0; i < size; i++) { | 396 return new_phi; |
397 if ( mem->_idx == value_phis->index_at(i) ) { | |
398 return value_phis->node_at(i); | |
399 } | |
400 } | |
401 | 397 |
402 if (level <= 0) { | 398 if (level <= 0) { |
403 return NULL; // Give up: phi tree too deep | 399 return NULL; // Give up: phi tree too deep |
404 } | 400 } |
405 Node *start_mem = C->start()->proj_out(TypeFunc::Memory); | 401 Node *start_mem = C->start()->proj_out(TypeFunc::Memory); |