Mercurial > hg > graal-compiler
diff src/share/vm/opto/live.cpp @ 12023:d1034bd8cefc
8022284: Hide internal data structure in PhaseCFG
Summary: Hide private node to block mapping using public interface
Reviewed-by: kvn, roland
author | adlertz |
---|---|
date | Wed, 07 Aug 2013 17:56:19 +0200 |
parents | 8373c19be854 |
children | adb9a7d94cb5 |
line wrap: on
line diff
--- a/src/share/vm/opto/live.cpp Mon Aug 05 15:03:40 2013 -0700 +++ b/src/share/vm/opto/live.cpp Wed Aug 07 17:56:19 2013 +0200 @@ -101,7 +101,7 @@ for( uint k=1; k<cnt; k++ ) { Node *nk = n->in(k); uint nkidx = nk->_idx; - if( _cfg._bbs[nkidx] != b ) { + if (_cfg.get_block_for_node(nk) != b) { uint u = _names[nkidx]; use->insert( u ); DEBUG_ONLY(def_outside->insert( u );) @@ -121,7 +121,7 @@ // Push these live-in things to predecessors for( uint l=1; l<b->num_preds(); l++ ) { - Block *p = _cfg._bbs[b->pred(l)->_idx]; + Block *p = _cfg.get_block_for_node(b->pred(l)); add_liveout( p, use, first_pass ); // PhiNode uses go in the live-out set of prior blocks. @@ -142,8 +142,10 @@ assert( delta->count(), "missing delta set" ); // Add new-live-in to predecessors live-out sets - for( uint l=1; l<b->num_preds(); l++ ) - add_liveout( _cfg._bbs[b->pred(l)->_idx], delta, first_pass ); + for (uint l = 1; l < b->num_preds(); l++) { + Block* block = _cfg.get_block_for_node(b->pred(l)); + add_liveout(block, delta, first_pass); + } freeset(b); } // End of while-worklist-not-empty