hotspot/src/share/vm/opto/phaseX.cpp
changeset 35545 a8f29dfd62b2
parent 34503 57d1a0e76091
child 35574 2b25eb88c8d6
equal deleted inserted replaced
35544:c7ec868d0923 35545:a8f29dfd62b2
   831     return i;
   831     return i;
   832   }
   832   }
   833 
   833 
   834   // Return Idealized original
   834   // Return Idealized original
   835   return k;
   835   return k;
       
   836 }
       
   837 
       
   838 bool PhaseGVN::is_dominator_helper(Node *d, Node *n, bool linear_only) {
       
   839   if (d->is_top() || n->is_top()) {
       
   840     return false;
       
   841   }
       
   842   assert(d->is_CFG() && n->is_CFG(), "must have CFG nodes");
       
   843   int i = 0;
       
   844   while (d != n) {
       
   845     n = IfNode::up_one_dom(n, linear_only);
       
   846     i++;
       
   847     if (n == NULL || i >= 10) {
       
   848       return false;
       
   849     }
       
   850   }
       
   851   return true;
   836 }
   852 }
   837 
   853 
   838 #ifdef ASSERT
   854 #ifdef ASSERT
   839 //------------------------------dead_loop_check--------------------------------
   855 //------------------------------dead_loop_check--------------------------------
   840 // Check for a simple dead loop when a data node references itself directly
   856 // Check for a simple dead loop when a data node references itself directly
  1523         }
  1539         }
  1524       }
  1540       }
  1525     }
  1541     }
  1526 
  1542 
  1527     // If changed Cast input, check Phi users for simple cycles
  1543     // If changed Cast input, check Phi users for simple cycles
  1528     if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
  1544     if (use->is_ConstraintCast()) {
  1529       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
  1545       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
  1530         Node* u = use->fast_out(i2);
  1546         Node* u = use->fast_out(i2);
  1531         if (u->is_Phi())
  1547         if (u->is_Phi())
  1532           _worklist.push(u);
  1548           _worklist.push(u);
  1533       }
  1549       }