Print this page


Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/opto/loopopts.cpp
          +++ new/src/share/vm/opto/loopopts.cpp
↓ open down ↓ 1385 lines elided ↑ open up ↑
1386 1386        IdealLoopTree *use_loop = get_loop( has_ctrl(use) ? get_ctrl(use) : use );
1387 1387        // Check for data-use outside of loop - at least one of OLD or USE
1388 1388        // must not be a CFG node.
1389 1389        if( !loop->is_member( use_loop ) && (!old->is_CFG() || !use->is_CFG())) {
1390 1390  
1391 1391          // If the Data use is an IF, that means we have an IF outside of the
1392 1392          // loop that is switching on a condition that is set inside of the
1393 1393          // loop.  Happens if people set a loop-exit flag; then test the flag
1394 1394          // in the loop to break the loop, then test is again outside of the
1395 1395          // loop to determine which way the loop exited.
1396      -        if( use->is_If() || use->is_CMove() ) {
     1396 +        // Loop predicate If node connects to Bool node through Opaque1 node.
     1397 +        if (use->is_If() || use->is_CMove() || C->is_predicate_opaq(use)) {
1397 1398            // Since this code is highly unlikely, we lazily build the worklist
1398 1399            // of such Nodes to go split.
1399 1400            if( !split_if_set )
1400 1401              split_if_set = new Node_List(area);
1401 1402            split_if_set->push(use);
1402 1403          }
1403 1404          if( use->is_Bool() ) {
1404 1405            if( !split_bool_set )
1405 1406              split_bool_set = new Node_List(area);
1406 1407            split_bool_set->push(use);
↓ open down ↓ 1367 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX