730 // Check for useless Phis. These appear if we spill, then
731 // coalesce away copies. Dont touch Phis in spilling live
732 // ranges; they are busy getting modifed in this pass.
733 if( lrgs(defidx).reg() < LRG::SPILL_REG ) {
734 uint i;
735 Node *u = NULL;
736 // Look for the Phi merging 2 unique inputs
737 for( i = 1; i < cnt; i++ ) {
738 // Ignore repeats and self
739 if( n->in(i) != u && n->in(i) != n ) {
740 // Found a unique input
741 if( u != NULL ) // If it's the 2nd, bail out
742 break;
743 u = n->in(i); // Else record it
744 }
745 }
746 assert( u, "at least 1 valid input expected" );
747 if( i >= cnt ) { // Found one unique input
748 assert(Find_id(n) == Find_id(u), "should be the same lrg");
749 n->replace_by(u); // Then replace with unique input
750 n->disconnect_inputs(NULL);
751 b->_nodes.remove(insidx);
752 insidx--;
753 b->_ihrp_index--;
754 b->_fhrp_index--;
755 }
756 }
757 }
758 continue;
759 }
760 assert( insidx > b->_ihrp_index ||
761 (b->_reg_pressure < (uint)INTPRESSURE) ||
762 b->_ihrp_index > 4000000 ||
763 b->_ihrp_index >= b->end_idx() ||
764 !b->_nodes[b->_ihrp_index]->is_Proj(), "" );
765 assert( insidx > b->_fhrp_index ||
766 (b->_freg_pressure < (uint)FLOATPRESSURE) ||
767 b->_fhrp_index > 4000000 ||
768 b->_fhrp_index >= b->end_idx() ||
769 !b->_nodes[b->_fhrp_index]->is_Proj(), "" );
770
|
730 // Check for useless Phis. These appear if we spill, then
731 // coalesce away copies. Dont touch Phis in spilling live
732 // ranges; they are busy getting modifed in this pass.
733 if( lrgs(defidx).reg() < LRG::SPILL_REG ) {
734 uint i;
735 Node *u = NULL;
736 // Look for the Phi merging 2 unique inputs
737 for( i = 1; i < cnt; i++ ) {
738 // Ignore repeats and self
739 if( n->in(i) != u && n->in(i) != n ) {
740 // Found a unique input
741 if( u != NULL ) // If it's the 2nd, bail out
742 break;
743 u = n->in(i); // Else record it
744 }
745 }
746 assert( u, "at least 1 valid input expected" );
747 if( i >= cnt ) { // Found one unique input
748 assert(Find_id(n) == Find_id(u), "should be the same lrg");
749 n->replace_by(u); // Then replace with unique input
750 n->disconnect_inputs(NULL, C);
751 b->_nodes.remove(insidx);
752 insidx--;
753 b->_ihrp_index--;
754 b->_fhrp_index--;
755 }
756 }
757 }
758 continue;
759 }
760 assert( insidx > b->_ihrp_index ||
761 (b->_reg_pressure < (uint)INTPRESSURE) ||
762 b->_ihrp_index > 4000000 ||
763 b->_ihrp_index >= b->end_idx() ||
764 !b->_nodes[b->_ihrp_index]->is_Proj(), "" );
765 assert( insidx > b->_fhrp_index ||
766 (b->_freg_pressure < (uint)FLOATPRESSURE) ||
767 b->_fhrp_index > 4000000 ||
768 b->_fhrp_index >= b->end_idx() ||
769 !b->_nodes[b->_fhrp_index]->is_Proj(), "" );
770
|