src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/phaseX.cpp

Print this page
rev 8049 : castpp gcm
rev 10220 : 8148786: xml.tranform fails on x86-64
Summary: CCP computes wrong type for CountedLoop iv Phi
Reviewed-by:


1697         if (m->bottom_type() != type(m)) { // If not already bottomed out
1698           worklist.push(m);     // Propagate change to user
1699         }
1700 
1701         // CmpU nodes can get their type information from two nodes up in the
1702         // graph (instead of from the nodes immediately above). Make sure they
1703         // are added to the worklist if nodes they depend on are updated, since
1704         // they could be missed and get wrong types otherwise.
1705         uint m_op = m->Opcode();
1706         if (m_op == Op_AddI || m_op == Op_SubI) {
1707           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
1708             Node* p = m->fast_out(i2); // Propagate changes to uses
1709             if (p->Opcode() == Op_CmpU) {
1710               // Got a CmpU which might need the new type information from node n.
1711               if(p->bottom_type() != type(p)) { // If not already bottomed out
1712                 worklist.push(p); // Propagate change to user
1713               }
1714             }
1715           }
1716         }

















1717       }
1718     }
1719   }
1720 }
1721 
1722 //------------------------------do_transform-----------------------------------
1723 // Top level driver for the recursive transformer
1724 void PhaseCCP::do_transform() {
1725   // Correct leaves of new-space Nodes; they point to old-space.
1726   C->set_root( transform(C->root())->as_Root() );
1727   assert( C->top(),  "missing TOP node" );
1728   assert( C->root(), "missing root" );
1729 }
1730 
1731 //------------------------------transform--------------------------------------
1732 // Given a Node in old-space, clone him into new-space.
1733 // Convert any of his old-space children into new-space children.
1734 Node *PhaseCCP::transform( Node *n ) {
1735   Node *new_node = _nodes[n->_idx]; // Check for transformed node
1736   if( new_node != NULL )




1697         if (m->bottom_type() != type(m)) { // If not already bottomed out
1698           worklist.push(m);     // Propagate change to user
1699         }
1700 
1701         // CmpU nodes can get their type information from two nodes up in the
1702         // graph (instead of from the nodes immediately above). Make sure they
1703         // are added to the worklist if nodes they depend on are updated, since
1704         // they could be missed and get wrong types otherwise.
1705         uint m_op = m->Opcode();
1706         if (m_op == Op_AddI || m_op == Op_SubI) {
1707           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
1708             Node* p = m->fast_out(i2); // Propagate changes to uses
1709             if (p->Opcode() == Op_CmpU) {
1710               // Got a CmpU which might need the new type information from node n.
1711               if(p->bottom_type() != type(p)) { // If not already bottomed out
1712                 worklist.push(p); // Propagate change to user
1713               }
1714             }
1715           }
1716         }
1717         // If n is used in a counted loop exit condition then the type
1718         // of the counted loop's Phi depends on the type of n. See
1719         // PhiNode::Value().
1720         if (m_op == Op_CmpI) {
1721           if (m->outcnt() > 0) {
1722             Node* bol = m->raw_out(0);
1723             if (bol->outcnt() > 0) {
1724               Node* iff = bol->raw_out(0);
1725               if (iff->is_CountedLoopEnd()) {
1726                 CountedLoopEndNode* cle = iff->as_CountedLoopEnd();
1727                 if (cle->limit() == n && cle->phi() != NULL) {
1728                   worklist.push(cle->phi());
1729                 }
1730               }
1731             }
1732           }
1733         }
1734       }
1735     }
1736   }
1737 }
1738 
1739 //------------------------------do_transform-----------------------------------
1740 // Top level driver for the recursive transformer
1741 void PhaseCCP::do_transform() {
1742   // Correct leaves of new-space Nodes; they point to old-space.
1743   C->set_root( transform(C->root())->as_Root() );
1744   assert( C->top(),  "missing TOP node" );
1745   assert( C->root(), "missing root" );
1746 }
1747 
1748 //------------------------------transform--------------------------------------
1749 // Given a Node in old-space, clone him into new-space.
1750 // Convert any of his old-space children into new-space children.
1751 Node *PhaseCCP::transform( Node *n ) {
1752   Node *new_node = _nodes[n->_idx]; // Check for transformed node
1753   if( new_node != NULL )


src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File