1745 } |
1745 } |
1746 |
1746 |
1747 _collecting = false; |
1747 _collecting = false; |
1748 assert(C->unique() == nodes_size(), "there should be no new ideal nodes during ConnectionGraph build"); |
1748 assert(C->unique() == nodes_size(), "there should be no new ideal nodes during ConnectionGraph build"); |
1749 |
1749 |
|
1750 if (EliminateLocks) { |
|
1751 // Mark locks before changing ideal graph. |
|
1752 int cnt = C->macro_count(); |
|
1753 for( int i=0; i < cnt; i++ ) { |
|
1754 Node *n = C->macro_node(i); |
|
1755 if (n->is_AbstractLock()) { // Lock and Unlock nodes |
|
1756 AbstractLockNode* alock = n->as_AbstractLock(); |
|
1757 if (!alock->is_eliminated()) { |
|
1758 PointsToNode::EscapeState es = escape_state(alock->obj_node()); |
|
1759 assert(es != PointsToNode::UnknownEscape, "should know"); |
|
1760 if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) { |
|
1761 // Mark it eliminated |
|
1762 alock->set_eliminated(); |
|
1763 } |
|
1764 } |
|
1765 } |
|
1766 } |
|
1767 } |
|
1768 |
1750 #ifndef PRODUCT |
1769 #ifndef PRODUCT |
1751 if (PrintEscapeAnalysis) { |
1770 if (PrintEscapeAnalysis) { |
1752 dump(); // Dump ConnectionGraph |
1771 dump(); // Dump ConnectionGraph |
1753 } |
1772 } |
1754 #endif |
1773 #endif |