hotspot/src/share/vm/opto/connode.cpp
changeset 1067 f82e0a8cd438
parent 781 e1baa9c8f16f
child 1400 afd034bb8c2e
equal deleted inserted replaced
1066:717c3345024f 1067:f82e0a8cd438
    99 //------------------------------Ideal------------------------------------------
    99 //------------------------------Ideal------------------------------------------
   100 // Return a node which is more "ideal" than the current node.
   100 // Return a node which is more "ideal" than the current node.
   101 // Move constants to the right.
   101 // Move constants to the right.
   102 Node *CMoveNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   102 Node *CMoveNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   103   if( in(0) && remove_dead_region(phase, can_reshape) ) return this;
   103   if( in(0) && remove_dead_region(phase, can_reshape) ) return this;
       
   104   // Don't bother trying to transform a dead node
       
   105   if( in(0) && in(0)->is_top() )  return NULL;
   104   assert( !phase->eqv(in(Condition), this) &&
   106   assert( !phase->eqv(in(Condition), this) &&
   105           !phase->eqv(in(IfFalse), this) &&
   107           !phase->eqv(in(IfFalse), this) &&
   106           !phase->eqv(in(IfTrue), this), "dead loop in CMoveNode::Ideal" );
   108           !phase->eqv(in(IfTrue), this), "dead loop in CMoveNode::Ideal" );
   107   if( phase->type(in(Condition)) == Type::TOP )
   109   if( phase->type(in(Condition)) == Type::TOP )
   108     return NULL; // return NULL when Condition is dead
   110     return NULL; // return NULL when Condition is dead