99 use->remove( r ); |
99 use->remove( r ); |
100 uint cnt = n->req(); |
100 uint cnt = n->req(); |
101 for( uint k=1; k<cnt; k++ ) { |
101 for( uint k=1; k<cnt; k++ ) { |
102 Node *nk = n->in(k); |
102 Node *nk = n->in(k); |
103 uint nkidx = nk->_idx; |
103 uint nkidx = nk->_idx; |
104 if( _cfg._bbs[nkidx] != b ) { |
104 if (_cfg.get_block_for_node(nk) != b) { |
105 uint u = _names[nkidx]; |
105 uint u = _names[nkidx]; |
106 use->insert( u ); |
106 use->insert( u ); |
107 DEBUG_ONLY(def_outside->insert( u );) |
107 DEBUG_ONLY(def_outside->insert( u );) |
108 } |
108 } |
109 } |
109 } |
119 use->remove( r ); |
119 use->remove( r ); |
120 } |
120 } |
121 |
121 |
122 // Push these live-in things to predecessors |
122 // Push these live-in things to predecessors |
123 for( uint l=1; l<b->num_preds(); l++ ) { |
123 for( uint l=1; l<b->num_preds(); l++ ) { |
124 Block *p = _cfg._bbs[b->pred(l)->_idx]; |
124 Block *p = _cfg.get_block_for_node(b->pred(l)); |
125 add_liveout( p, use, first_pass ); |
125 add_liveout( p, use, first_pass ); |
126 |
126 |
127 // PhiNode uses go in the live-out set of prior blocks. |
127 // PhiNode uses go in the live-out set of prior blocks. |
128 for( uint k=i; k>0; k-- ) |
128 for( uint k=i; k>0; k-- ) |
129 add_liveout( p, _names[b->_nodes[k-1]->in(l)->_idx], first_pass ); |
129 add_liveout( p, _names[b->_nodes[k-1]->in(l)->_idx], first_pass ); |
140 Block *b = _worklist->pop(); |
140 Block *b = _worklist->pop(); |
141 IndexSet *delta = getset(b); |
141 IndexSet *delta = getset(b); |
142 assert( delta->count(), "missing delta set" ); |
142 assert( delta->count(), "missing delta set" ); |
143 |
143 |
144 // Add new-live-in to predecessors live-out sets |
144 // Add new-live-in to predecessors live-out sets |
145 for( uint l=1; l<b->num_preds(); l++ ) |
145 for (uint l = 1; l < b->num_preds(); l++) { |
146 add_liveout( _cfg._bbs[b->pred(l)->_idx], delta, first_pass ); |
146 Block* block = _cfg.get_block_for_node(b->pred(l)); |
|
147 add_liveout(block, delta, first_pass); |
|
148 } |
147 |
149 |
148 freeset(b); |
150 freeset(b); |
149 } // End of while-worklist-not-empty |
151 } // End of while-worklist-not-empty |
150 |
152 |
151 } // End of for-all-blocks-outer-loop |
153 } // End of for-all-blocks-outer-loop |