Mercurial > hg > truffle
comparison src/share/vm/opto/buildOopMap.cpp @ 12167:650868c062a9
8023691: Create interface for nodes in class Block
Summary: Create public methods for accessing the nodes in a block
Reviewed-by: kvn, roland
author | adlertz |
---|---|
date | Mon, 26 Aug 2013 12:50:23 +0200 |
parents | adb9a7d94cb5 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
12161:e1fbb86b47e4 | 12167:650868c062a9 |
---|---|
119 }; | 119 }; |
120 | 120 |
121 // Given reaching-defs for this block start, compute it for this block end | 121 // Given reaching-defs for this block start, compute it for this block end |
122 void OopFlow::compute_reach( PhaseRegAlloc *regalloc, int max_reg, Dict *safehash ) { | 122 void OopFlow::compute_reach( PhaseRegAlloc *regalloc, int max_reg, Dict *safehash ) { |
123 | 123 |
124 for( uint i=0; i<_b->_nodes.size(); i++ ) { | 124 for( uint i=0; i<_b->number_of_nodes(); i++ ) { |
125 Node *n = _b->_nodes[i]; | 125 Node *n = _b->get_node(i); |
126 | 126 |
127 if( n->jvms() ) { // Build an OopMap here? | 127 if( n->jvms() ) { // Build an OopMap here? |
128 JVMState *jvms = n->jvms(); | 128 JVMState *jvms = n->jvms(); |
129 // no map needed for leaf calls | 129 // no map needed for leaf calls |
130 if( n->is_MachSafePoint() && !n->is_MachCallLeaf() ) { | 130 if( n->is_MachSafePoint() && !n->is_MachCallLeaf() ) { |
445 for( int i=0; i<max_reg_ints; i++ ) | 445 for( int i=0; i<max_reg_ints; i++ ) |
446 tmp_live[i] |= t[i]; | 446 tmp_live[i] |= t[i]; |
447 } | 447 } |
448 | 448 |
449 // Now walk tmp_live up the block backwards, computing live | 449 // Now walk tmp_live up the block backwards, computing live |
450 for( int k=b->_nodes.size()-1; k>=0; k-- ) { | 450 for( int k=b->number_of_nodes()-1; k>=0; k-- ) { |
451 Node *n = b->_nodes[k]; | 451 Node *n = b->get_node(k); |
452 // KILL def'd bits | 452 // KILL def'd bits |
453 int first = regalloc->get_reg_first(n); | 453 int first = regalloc->get_reg_first(n); |
454 int second = regalloc->get_reg_second(n); | 454 int second = regalloc->get_reg_second(n); |
455 if( OptoReg::is_valid(first) ) clr_live_bit(tmp_live,first); | 455 if( OptoReg::is_valid(first) ) clr_live_bit(tmp_live,first); |
456 if( OptoReg::is_valid(second) ) clr_live_bit(tmp_live,second); | 456 if( OptoReg::is_valid(second) ) clr_live_bit(tmp_live,second); |
542 // ala ZKM.jar | 542 // ala ZKM.jar |
543 uint i; | 543 uint i; |
544 for (i = 1; i < cfg->number_of_blocks(); i++) { | 544 for (i = 1; i < cfg->number_of_blocks(); i++) { |
545 Block* block = cfg->get_block(i); | 545 Block* block = cfg->get_block(i); |
546 uint j; | 546 uint j; |
547 for (j = 1; j < block->_nodes.size(); j++) { | 547 for (j = 1; j < block->number_of_nodes(); j++) { |
548 if (block->_nodes[j]->jvms() && (*safehash)[block->_nodes[j]] == NULL) { | 548 if (block->get_node(j)->jvms() && (*safehash)[block->get_node(j)] == NULL) { |
549 break; | 549 break; |
550 } | 550 } |
551 } | 551 } |
552 if (j < block->_nodes.size()) { | 552 if (j < block->number_of_nodes()) { |
553 break; | 553 break; |
554 } | 554 } |
555 } | 555 } |
556 if (i == cfg->number_of_blocks()) { | 556 if (i == cfg->number_of_blocks()) { |
557 break; // Got 'em all | 557 break; // Got 'em all |