Mercurial > hg > graal-compiler
comparison src/share/vm/opto/phaseX.cpp @ 65:99269dbf4ba8
6674588: (Escape Analysis) Improve Escape Analysis code
Summary: Current EA code has several problems which have to be fixed.
Reviewed-by: jrose, sgoldman
author | kvn |
---|---|
date | Fri, 14 Mar 2008 15:26:33 -0700 |
parents | 874b2c4f43d1 |
children | ba764ed4b6f2 |
comparison
equal
deleted
inserted
replaced
64:b8f5ba577b02 | 65:99269dbf4ba8 |
---|---|
585 GrowableArray<Node_Notes*>* nna = C->node_note_array(); | 585 GrowableArray<Node_Notes*>* nna = C->node_note_array(); |
586 if (nna != NULL) { | 586 if (nna != NULL) { |
587 Node_Notes* loc = C->locate_node_notes(nna, x->_idx, true); | 587 Node_Notes* loc = C->locate_node_notes(nna, x->_idx, true); |
588 loc->clear(); // do not put debug info on constants | 588 loc->clear(); // do not put debug info on constants |
589 } | 589 } |
590 // Collect points-to information for escape analysys | |
591 ConnectionGraph *cgr = C->congraph(); | |
592 if (cgr != NULL) { | |
593 cgr->record_escape(x, this); | |
594 } | |
595 } else { | 590 } else { |
596 x->destruct(); // Hit, destroy duplicate constant | 591 x->destruct(); // Hit, destroy duplicate constant |
597 x = k; // use existing constant | 592 x = k; // use existing constant |
598 } | 593 } |
599 return x; | 594 return x; |
710 i = hash_find_insert(k); // Insert if new | 705 i = hash_find_insert(k); // Insert if new |
711 if( i && (i != k) ) { | 706 if( i && (i != k) ) { |
712 // Return the pre-existing node | 707 // Return the pre-existing node |
713 NOT_PRODUCT( set_progress(); ) | 708 NOT_PRODUCT( set_progress(); ) |
714 return i; | 709 return i; |
715 } | |
716 | |
717 // Collect points-to information for escape analysys | |
718 ConnectionGraph *cgr = C->congraph(); | |
719 if (cgr != NULL) { | |
720 cgr->record_escape(k, this); | |
721 } | 710 } |
722 | 711 |
723 // Return Idealized original | 712 // Return Idealized original |
724 return k; | 713 return k; |
725 } | 714 } |
1243 } | 1232 } |
1244 } | 1233 } |
1245 | 1234 |
1246 uint use_op = use->Opcode(); | 1235 uint use_op = use->Opcode(); |
1247 // If changed Cast input, check Phi users for simple cycles | 1236 // If changed Cast input, check Phi users for simple cycles |
1248 if( use->is_ConstraintCast() || use->Opcode() == Op_CheckCastPP ) { | 1237 if( use->is_ConstraintCast() || use->is_CheckCastPP() ) { |
1249 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { | 1238 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { |
1250 Node* u = use->fast_out(i2); | 1239 Node* u = use->fast_out(i2); |
1251 if (u->is_Phi()) | 1240 if (u->is_Phi()) |
1252 _worklist.push(u); | 1241 _worklist.push(u); |
1253 } | 1242 } |