< prev index next >

src/hotspot/share/opto/phaseX.cpp

Print this page




 986     Node *n = _table.at(i);
 987     if(n != NULL && n != _table.sentinel() && n->outcnt() == 0) {
 988       if( n->is_top() ) continue;
 989       assert( false, "Parse::remove_useless_nodes missed this node");
 990       hash_delete(n);
 991     }
 992   }
 993 
 994   // Any Phis or Regions on the worklist probably had uses that could not
 995   // make more progress because the uses were made while the Phis and Regions
 996   // were in half-built states.  Put all uses of Phis and Regions on worklist.
 997   max = _worklist.size();
 998   for( uint j = 0; j < max; j++ ) {
 999     Node *n = _worklist.at(j);
1000     uint uop = n->Opcode();
1001     if( uop == Op_Phi || uop == Op_Region ||
1002         n->is_Type() ||
1003         n->is_Mem() )
1004       add_users_to_worklist(n);
1005   }



1006 }
1007 
1008 /**
1009  * Initialize worklist for each node.
1010  */
1011 void PhaseIterGVN::init_worklist(Node* first) {
1012   Unique_Node_List to_process;
1013   to_process.push(first);
1014 
1015   while (to_process.size() > 0) {
1016     Node* n = to_process.pop();
1017     if (!_worklist.member(n)) {
1018       _worklist.push(n);
1019 
1020       uint cnt = n->req();
1021       for(uint i = 0; i < cnt; i++) {
1022         Node* m = n->in(i);
1023         if (m != NULL) {
1024           to_process.push(m);
1025         }




 986     Node *n = _table.at(i);
 987     if(n != NULL && n != _table.sentinel() && n->outcnt() == 0) {
 988       if( n->is_top() ) continue;
 989       assert( false, "Parse::remove_useless_nodes missed this node");
 990       hash_delete(n);
 991     }
 992   }
 993 
 994   // Any Phis or Regions on the worklist probably had uses that could not
 995   // make more progress because the uses were made while the Phis and Regions
 996   // were in half-built states.  Put all uses of Phis and Regions on worklist.
 997   max = _worklist.size();
 998   for( uint j = 0; j < max; j++ ) {
 999     Node *n = _worklist.at(j);
1000     uint uop = n->Opcode();
1001     if( uop == Op_Phi || uop == Op_Region ||
1002         n->is_Type() ||
1003         n->is_Mem() )
1004       add_users_to_worklist(n);
1005   }
1006 
1007   BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
1008   bs->add_users_to_worklist(&_worklist);
1009 }
1010 
1011 /**
1012  * Initialize worklist for each node.
1013  */
1014 void PhaseIterGVN::init_worklist(Node* first) {
1015   Unique_Node_List to_process;
1016   to_process.push(first);
1017 
1018   while (to_process.size() > 0) {
1019     Node* n = to_process.pop();
1020     if (!_worklist.member(n)) {
1021       _worklist.push(n);
1022 
1023       uint cnt = n->req();
1024       for(uint i = 0; i < cnt; i++) {
1025         Node* m = n->in(i);
1026         if (m != NULL) {
1027           to_process.push(m);
1028         }


< prev index next >