comparison src/share/vm/opto/live.cpp @ 12269:da051ce490eb

Merge
author adlertz
date Thu, 19 Sep 2013 18:01:39 +0200
parents 7944aba7ba41 8c83625e3a53
children de6a9e811145
comparison
equal deleted inserted replaced
12253:179cd89fb279 12269:da051ce490eb
89 Node* n = block->get_node(i-1); 89 Node* n = block->get_node(i-1);
90 if (n->is_Phi()) { 90 if (n->is_Phi()) {
91 break; 91 break;
92 } 92 }
93 93
94 uint r = _names[n->_idx]; 94 uint r = _names.at(n->_idx);
95 assert(!def_outside->member(r), "Use of external LRG overlaps the same LRG defined in this block"); 95 assert(!def_outside->member(r), "Use of external LRG overlaps the same LRG defined in this block");
96 def->insert( r ); 96 def->insert( r );
97 use->remove( r ); 97 use->remove( r );
98 uint cnt = n->req(); 98 uint cnt = n->req();
99 for (uint k = 1; k < cnt; k++) { 99 for (uint k = 1; k < cnt; k++) {
100 Node *nk = n->in(k); 100 Node *nk = n->in(k);
101 uint nkidx = nk->_idx; 101 uint nkidx = nk->_idx;
102 if (_cfg.get_block_for_node(nk) != block) { 102 if (_cfg.get_block_for_node(nk) != block) {
103 uint u = _names[nkidx]; 103 uint u = _names.at(nkidx);
104 use->insert(u); 104 use->insert(u);
105 DEBUG_ONLY(def_outside->insert(u);) 105 DEBUG_ONLY(def_outside->insert(u);)
106 } 106 }
107 } 107 }
108 } 108 }
110 def_outside->set_next(_free_IndexSet); 110 def_outside->set_next(_free_IndexSet);
111 _free_IndexSet = def_outside; // Drop onto free list 111 _free_IndexSet = def_outside; // Drop onto free list
112 #endif 112 #endif
113 // Remove anything defined by Phis and the block start instruction 113 // Remove anything defined by Phis and the block start instruction
114 for (uint k = i; k > 0; k--) { 114 for (uint k = i; k > 0; k--) {
115 uint r = _names[block->get_node(k - 1)->_idx]; 115 uint r = _names.at(block->get_node(k - 1)->_idx);
116 def->insert(r); 116 def->insert(r);
117 use->remove(r); 117 use->remove(r);
118 } 118 }
119 119
120 // Push these live-in things to predecessors 120 // Push these live-in things to predecessors
122 Block* p = _cfg.get_block_for_node(block->pred(l)); 122 Block* p = _cfg.get_block_for_node(block->pred(l));
123 add_liveout(p, use, first_pass); 123 add_liveout(p, use, first_pass);
124 124
125 // PhiNode uses go in the live-out set of prior blocks. 125 // PhiNode uses go in the live-out set of prior blocks.
126 for (uint k = i; k > 0; k--) { 126 for (uint k = i; k > 0; k--) {
127 add_liveout(p, _names[block->get_node(k-1)->in(l)->_idx], first_pass); 127 add_liveout(p, _names.at(block->get_node(k-1)->in(l)->_idx), first_pass);
128 } 128 }
129 } 129 }
130 freeset(block); 130 freeset(block);
131 first_pass.set(block->_pre_order); 131 first_pass.set(block->_pre_order);
132 132
254 void PhaseLive::dump( const Block *b ) const { 254 void PhaseLive::dump( const Block *b ) const {
255 tty->print("Block %d: ",b->_pre_order); 255 tty->print("Block %d: ",b->_pre_order);
256 tty->print("LiveOut: "); _live[b->_pre_order-1].dump(); 256 tty->print("LiveOut: "); _live[b->_pre_order-1].dump();
257 uint cnt = b->number_of_nodes(); 257 uint cnt = b->number_of_nodes();
258 for( uint i=0; i<cnt; i++ ) { 258 for( uint i=0; i<cnt; i++ ) {
259 tty->print("L%d/", _names[b->get_node(i)->_idx] ); 259 tty->print("L%d/", _names.at(b->get_node(i)->_idx));
260 b->get_node(i)->dump(); 260 b->get_node(i)->dump();
261 } 261 }
262 tty->print("\n"); 262 tty->print("\n");
263 } 263 }
264 264