1743 if (m_op == Op_AddI || m_op == Op_SubI) { 1744 for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) { 1745 Node* p = m->fast_out(i2); // Propagate changes to uses 1746 if (p->Opcode() == Op_CmpU) { 1747 // Got a CmpU which might need the new type information from node n. 1748 if(p->bottom_type() != type(p)) { // If not already bottomed out 1749 worklist.push(p); // Propagate change to user 1750 } 1751 } 1752 } 1753 } 1754 // If n is used in a counted loop exit condition then the type 1755 // of the counted loop's Phi depends on the type of n. See 1756 // PhiNode::Value(). 1757 if (m_op == Op_CmpI) { 1758 PhiNode* phi = countedloop_phi_from_cmp((CmpINode*)m, n); 1759 if (phi != NULL) { 1760 worklist.push(phi); 1761 } 1762 } 1763 } 1764 } 1765 } 1766 } 1767 1768 //------------------------------do_transform----------------------------------- 1769 // Top level driver for the recursive transformer 1770 void PhaseCCP::do_transform() { 1771 // Correct leaves of new-space Nodes; they point to old-space. 1772 C->set_root( transform(C->root())->as_Root() ); 1773 assert( C->top(), "missing TOP node" ); 1774 assert( C->root(), "missing root" ); 1775 } 1776 1777 //------------------------------transform-------------------------------------- 1778 // Given a Node in old-space, clone him into new-space. 1779 // Convert any of his old-space children into new-space children. 1780 Node *PhaseCCP::transform( Node *n ) { 1781 Node *new_node = _nodes[n->_idx]; // Check for transformed node 1782 if( new_node != NULL ) | 1743 if (m_op == Op_AddI || m_op == Op_SubI) { 1744 for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) { 1745 Node* p = m->fast_out(i2); // Propagate changes to uses 1746 if (p->Opcode() == Op_CmpU) { 1747 // Got a CmpU which might need the new type information from node n. 1748 if(p->bottom_type() != type(p)) { // If not already bottomed out 1749 worklist.push(p); // Propagate change to user 1750 } 1751 } 1752 } 1753 } 1754 // If n is used in a counted loop exit condition then the type 1755 // of the counted loop's Phi depends on the type of n. See 1756 // PhiNode::Value(). 1757 if (m_op == Op_CmpI) { 1758 PhiNode* phi = countedloop_phi_from_cmp((CmpINode*)m, n); 1759 if (phi != NULL) { 1760 worklist.push(phi); 1761 } 1762 } 1763 // Loading the java mirror from a klass oop requires two loads and the type 1764 // of the mirror load depends on the type of 'n'. See LoadNode::Value(). 1765 if (m_op == Op_LoadP && m->bottom_type()->isa_rawptr()) { 1766 for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) { 1767 Node* u = m->fast_out(i2); 1768 const Type* ut = u->bottom_type(); 1769 if (u->Opcode() == Op_LoadP && ut->isa_instptr() && ut != type(u)) { 1770 worklist.push(u); 1771 } 1772 } 1773 } 1774 } 1775 } 1776 } 1777 } 1778 1779 //------------------------------do_transform----------------------------------- 1780 // Top level driver for the recursive transformer 1781 void PhaseCCP::do_transform() { 1782 // Correct leaves of new-space Nodes; they point to old-space. 1783 C->set_root( transform(C->root())->as_Root() ); 1784 assert( C->top(), "missing TOP node" ); 1785 assert( C->root(), "missing root" ); 1786 } 1787 1788 //------------------------------transform-------------------------------------- 1789 // Given a Node in old-space, clone him into new-space. 1790 // Convert any of his old-space children into new-space children. 1791 Node *PhaseCCP::transform( Node *n ) { 1792 Node *new_node = _nodes[n->_idx]; // Check for transformed node 1793 if( new_node != NULL ) |