src/share/vm/opto/loopopts.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8046275 Sdiff src/share/vm/opto

src/share/vm/opto/loopopts.cpp

Print this page




1386     Node* nnn = old_new[old->_idx];
1387     // Copy uses to a worklist, so I can munge the def-use info
1388     // with impunity.
1389     for (DUIterator_Fast jmax, j = old->fast_outs(jmax); j < jmax; j++)
1390       worklist.push(old->fast_out(j));
1391 
1392     while( worklist.size() ) {
1393       Node *use = worklist.pop();
1394       if (!has_node(use))  continue; // Ignore dead nodes
1395       if (use->in(0) == C->top())  continue;
1396       IdealLoopTree *use_loop = get_loop( has_ctrl(use) ? get_ctrl(use) : use );
1397       // Check for data-use outside of loop - at least one of OLD or USE
1398       // must not be a CFG node.
1399       if( !loop->is_member( use_loop ) && (!old->is_CFG() || !use->is_CFG())) {
1400 
1401         // If the Data use is an IF, that means we have an IF outside of the
1402         // loop that is switching on a condition that is set inside of the
1403         // loop.  Happens if people set a loop-exit flag; then test the flag
1404         // in the loop to break the loop, then test is again outside of the
1405         // loop to determine which way the loop exited.
1406         if( use->is_If() || use->is_CMove() ) {

1407           // Since this code is highly unlikely, we lazily build the worklist
1408           // of such Nodes to go split.
1409           if( !split_if_set )
1410             split_if_set = new Node_List(area);
1411           split_if_set->push(use);
1412         }
1413         if( use->is_Bool() ) {
1414           if( !split_bool_set )
1415             split_bool_set = new Node_List(area);
1416           split_bool_set->push(use);
1417         }
1418         if( use->Opcode() == Op_CreateEx ) {
1419           if( !split_cex_set )
1420             split_cex_set = new Node_List(area);
1421           split_cex_set->push(use);
1422         }
1423 
1424 
1425         // Get "block" use is in
1426         uint idx = 0;




1386     Node* nnn = old_new[old->_idx];
1387     // Copy uses to a worklist, so I can munge the def-use info
1388     // with impunity.
1389     for (DUIterator_Fast jmax, j = old->fast_outs(jmax); j < jmax; j++)
1390       worklist.push(old->fast_out(j));
1391 
1392     while( worklist.size() ) {
1393       Node *use = worklist.pop();
1394       if (!has_node(use))  continue; // Ignore dead nodes
1395       if (use->in(0) == C->top())  continue;
1396       IdealLoopTree *use_loop = get_loop( has_ctrl(use) ? get_ctrl(use) : use );
1397       // Check for data-use outside of loop - at least one of OLD or USE
1398       // must not be a CFG node.
1399       if( !loop->is_member( use_loop ) && (!old->is_CFG() || !use->is_CFG())) {
1400 
1401         // If the Data use is an IF, that means we have an IF outside of the
1402         // loop that is switching on a condition that is set inside of the
1403         // loop.  Happens if people set a loop-exit flag; then test the flag
1404         // in the loop to break the loop, then test is again outside of the
1405         // loop to determine which way the loop exited.
1406         // Loop predicate If node connectes to Bool node through Opaque1 node.
1407         if(use->is_If() || use->is_CMove() || C->is_predicate_opaq(use)) {
1408           // Since this code is highly unlikely, we lazily build the worklist
1409           // of such Nodes to go split.
1410           if( !split_if_set )
1411             split_if_set = new Node_List(area);
1412           split_if_set->push(use);
1413         }
1414         if( use->is_Bool() ) {
1415           if( !split_bool_set )
1416             split_bool_set = new Node_List(area);
1417           split_bool_set->push(use);
1418         }
1419         if( use->Opcode() == Op_CreateEx ) {
1420           if( !split_cex_set )
1421             split_cex_set = new Node_List(area);
1422           split_cex_set->push(use);
1423         }
1424 
1425 
1426         // Get "block" use is in
1427         uint idx = 0;


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