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

src/share/vm/opto/phaseX.cpp

Print this page




1498           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
1499             Node* p = m->fast_out(i2);  // Propagate changes to uses
1500             if (p->is_Proj() && p->as_Proj()->_con == TypeFunc::Control && p->outcnt() == 1)
1501               worklist.push(p->unique_out());
1502           }
1503         }
1504         if( m->bottom_type() != type(m) ) // If not already bottomed out
1505           worklist.push(m);     // Propagate change to user
1506       }
1507     }
1508   }
1509 }
1510 
1511 //------------------------------do_transform-----------------------------------
1512 // Top level driver for the recursive transformer
1513 void PhaseCCP::do_transform() {
1514   // Correct leaves of new-space Nodes; they point to old-space.
1515   C->set_root( transform(C->root())->as_Root() );
1516   assert( C->top(),  "missing TOP node" );
1517   assert( C->root(), "missing root" );















1518 }
1519 
1520 //------------------------------transform--------------------------------------
1521 // Given a Node in old-space, clone him into new-space.
1522 // Convert any of his old-space children into new-space children.
1523 Node *PhaseCCP::transform( Node *n ) {
1524   Node *new_node = _nodes[n->_idx]; // Check for transformed node
1525   if( new_node != NULL )
1526     return new_node;                // Been there, done that, return old answer
1527   new_node = transform_once(n);     // Check for constant
1528   _nodes.map( n->_idx, new_node );  // Flag as having been cloned
1529 
1530   // Allocate stack of size _nodes.Size()/2 to avoid frequent realloc
1531   GrowableArray <Node *> trstack(C->unique() >> 1);
1532 
1533   trstack.push(new_node);           // Process children of cloned node
1534   while ( trstack.is_nonempty() ) {
1535     Node *clone = trstack.pop();
1536     uint cnt = clone->req();
1537     for( uint i = 0; i < cnt; i++ ) {          // For all inputs do




1498           for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
1499             Node* p = m->fast_out(i2);  // Propagate changes to uses
1500             if (p->is_Proj() && p->as_Proj()->_con == TypeFunc::Control && p->outcnt() == 1)
1501               worklist.push(p->unique_out());
1502           }
1503         }
1504         if( m->bottom_type() != type(m) ) // If not already bottomed out
1505           worklist.push(m);     // Propagate change to user
1506       }
1507     }
1508   }
1509 }
1510 
1511 //------------------------------do_transform-----------------------------------
1512 // Top level driver for the recursive transformer
1513 void PhaseCCP::do_transform() {
1514   // Correct leaves of new-space Nodes; they point to old-space.
1515   C->set_root( transform(C->root())->as_Root() );
1516   assert( C->top(),  "missing TOP node" );
1517   assert( C->root(), "missing root" );
1518 
1519   // Eagerly remove castPP nodes here. CastPP nodes might not be
1520   // removed in the subsequent IGVN phase if a node that changes
1521   // in(1) of a castPP is processed prior to the castPP node.
1522   for (uint i = 0; i < _worklist.size(); i++) {
1523     Node* n = _worklist.at(i);
1524 
1525     if (n->is_ConstraintCast()) {
1526       Node* nn = n->Identity(this);
1527       if (nn != n) {
1528         replace_node(n, nn);
1529         _worklist.remove(n);
1530       }
1531     }
1532   }
1533 }
1534 
1535 //------------------------------transform--------------------------------------
1536 // Given a Node in old-space, clone him into new-space.
1537 // Convert any of his old-space children into new-space children.
1538 Node *PhaseCCP::transform( Node *n ) {
1539   Node *new_node = _nodes[n->_idx]; // Check for transformed node
1540   if( new_node != NULL )
1541     return new_node;                // Been there, done that, return old answer
1542   new_node = transform_once(n);     // Check for constant
1543   _nodes.map( n->_idx, new_node );  // Flag as having been cloned
1544 
1545   // Allocate stack of size _nodes.Size()/2 to avoid frequent realloc
1546   GrowableArray <Node *> trstack(C->unique() >> 1);
1547 
1548   trstack.push(new_node);           // Process children of cloned node
1549   while ( trstack.is_nonempty() ) {
1550     Node *clone = trstack.pop();
1551     uint cnt = clone->req();
1552     for( uint i = 0; i < cnt; i++ ) {          // For all inputs do


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