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

src/share/vm/opto/phaseX.cpp

Print this page




 827   uint cnt = n->req();
 828   for( uint i =0 ; i < cnt; i++ ) {
 829     Node *m = n->in(i);
 830     if( m ) init_worklist(m);
 831   }
 832 }
 833 
 834 //------------------------------optimize---------------------------------------
 835 void PhaseIterGVN::optimize() {
 836   debug_only(uint num_processed  = 0;);
 837 #ifndef PRODUCT
 838   {
 839     _verify_counter = 0;
 840     _verify_full_passes = 0;
 841     for ( int i = 0; i < _verify_window_size; i++ ) {
 842       _verify_window[i] = NULL;
 843     }
 844   }
 845 #endif
 846 





 847   // Pull from worklist; transform node;
 848   // If node has changed: update edge info and put uses on worklist.
 849   while( _worklist.size() ) {
 850     Node *n  = _worklist.pop();















 851     if (TraceIterativeGVN && Verbose) {
 852       tty->print("  Pop ");
 853       NOT_PRODUCT( n->dump(); )
 854       debug_only(if( (num_processed++ % 100) == 0 ) _worklist.print_set();)
 855     }
 856 
 857     if (n->outcnt() != 0) {
 858 
 859 #ifndef PRODUCT
 860       uint wlsize = _worklist.size();
 861       const Type* oldtype = type_or_null(n);
 862 #endif //PRODUCT
 863 
 864       Node *nn = transform_old(n);
 865 
 866 #ifndef PRODUCT
 867       if (TraceIterativeGVN) {
 868         const Type* newtype = type_or_null(n);
 869         if (nn != n) {
 870           // print old node




 827   uint cnt = n->req();
 828   for( uint i =0 ; i < cnt; i++ ) {
 829     Node *m = n->in(i);
 830     if( m ) init_worklist(m);
 831   }
 832 }
 833 
 834 //------------------------------optimize---------------------------------------
 835 void PhaseIterGVN::optimize() {
 836   debug_only(uint num_processed  = 0;);
 837 #ifndef PRODUCT
 838   {
 839     _verify_counter = 0;
 840     _verify_full_passes = 0;
 841     for ( int i = 0; i < _verify_window_size; i++ ) {
 842       _verify_window[i] = NULL;
 843     }
 844   }
 845 #endif
 846 
 847 #ifdef ASSERT
 848   Node* prev = NULL;
 849   uint rep_cnt = 0;
 850   uint loop_count = 0;
 851 #endif
 852   // Pull from worklist; transform node;
 853   // If node has changed: update edge info and put uses on worklist.
 854   while( _worklist.size() ) {
 855     Node *n  = _worklist.pop();
 856 #ifdef ASSERT
 857     if (++loop_count >= K * C->unique()) {
 858       n->dump(4);
 859       assert(false, "infinite loop in PhaseIterGVN::optimize");
 860     }
 861     if (n == prev) {
 862       if (++rep_cnt > 3) {
 863         n->dump(4);
 864         assert(false, "loop in Ideal transformation");
 865       }
 866     } else {
 867       rep_cnt = 0;
 868     }
 869     prev = n;
 870 #endif
 871     if (TraceIterativeGVN && Verbose) {
 872       tty->print("  Pop ");
 873       NOT_PRODUCT( n->dump(); )
 874       debug_only(if( (num_processed++ % 100) == 0 ) _worklist.print_set();)
 875     }
 876 
 877     if (n->outcnt() != 0) {
 878 
 879 #ifndef PRODUCT
 880       uint wlsize = _worklist.size();
 881       const Type* oldtype = type_or_null(n);
 882 #endif //PRODUCT
 883 
 884       Node *nn = transform_old(n);
 885 
 886 #ifndef PRODUCT
 887       if (TraceIterativeGVN) {
 888         const Type* newtype = type_or_null(n);
 889         if (nn != n) {
 890           // print old node


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