Mercurial > hg > truffle
comparison src/share/vm/opto/lcm.cpp @ 3842:c7b60b601eb4
7069452: Cleanup NodeFlags
Summary: Remove flags which duplicate information in Node::NodeClasses.
Reviewed-by: never
author | kvn |
---|---|
date | Wed, 27 Jul 2011 17:28:36 -0700 |
parents | 7d9e451f5416 |
children | f03a3c8bd5e5 |
comparison
equal
deleted
inserted
replaced
3841:0f34fdee809e | 3842:c7b60b601eb4 |
---|---|
323 cfg->_bbs.map(val->_idx,this); | 323 cfg->_bbs.map(val->_idx,this); |
324 // DecodeN on x86 may kill flags. Check for flag-killing projections | 324 // DecodeN on x86 may kill flags. Check for flag-killing projections |
325 // that also need to be hoisted. | 325 // that also need to be hoisted. |
326 for (DUIterator_Fast jmax, j = val->fast_outs(jmax); j < jmax; j++) { | 326 for (DUIterator_Fast jmax, j = val->fast_outs(jmax); j < jmax; j++) { |
327 Node* n = val->fast_out(j); | 327 Node* n = val->fast_out(j); |
328 if( n->Opcode() == Op_MachProj ) { | 328 if( n->is_MachProj() ) { |
329 cfg->_bbs[n->_idx]->find_remove(n); | 329 cfg->_bbs[n->_idx]->find_remove(n); |
330 this->add_inst(n); | 330 this->add_inst(n); |
331 cfg->_bbs.map(n->_idx,this); | 331 cfg->_bbs.map(n->_idx,this); |
332 } | 332 } |
333 } | 333 } |
345 | 345 |
346 // Check for flag-killing projections that also need to be hoisted | 346 // Check for flag-killing projections that also need to be hoisted |
347 // Should be DU safe because no edge updates. | 347 // Should be DU safe because no edge updates. |
348 for (DUIterator_Fast jmax, j = best->fast_outs(jmax); j < jmax; j++) { | 348 for (DUIterator_Fast jmax, j = best->fast_outs(jmax); j < jmax; j++) { |
349 Node* n = best->fast_out(j); | 349 Node* n = best->fast_out(j); |
350 if( n->Opcode() == Op_MachProj ) { | 350 if( n->is_MachProj() ) { |
351 cfg->_bbs[n->_idx]->find_remove(n); | 351 cfg->_bbs[n->_idx]->find_remove(n); |
352 add_inst(n); | 352 add_inst(n); |
353 cfg->_bbs.map(n->_idx,this); | 353 cfg->_bbs.map(n->_idx,this); |
354 } | 354 } |
355 } | 355 } |
537 Node* call = NULL; | 537 Node* call = NULL; |
538 for (DUIterator_Fast imax, i = this_call->fast_outs(imax); i < imax; i++) { | 538 for (DUIterator_Fast imax, i = this_call->fast_outs(imax); i < imax; i++) { |
539 Node* m = this_call->fast_out(i); | 539 Node* m = this_call->fast_out(i); |
540 if( bbs[m->_idx] == this && // Local-block user | 540 if( bbs[m->_idx] == this && // Local-block user |
541 m != this_call && // Not self-start node | 541 m != this_call && // Not self-start node |
542 m->is_Call() ) | 542 m->is_MachCall() ) |
543 call = m; | 543 call = m; |
544 break; | 544 break; |
545 } | 545 } |
546 if (call == NULL) return; // No next call (e.g., block end is near) | 546 if (call == NULL) return; // No next call (e.g., block end is near) |
547 // Set next-call for all inputs to this call | 547 // Set next-call for all inputs to this call |
555 // Schedule all the users of the call right now. All the users are | 555 // Schedule all the users of the call right now. All the users are |
556 // projection Nodes, so they must be scheduled next to the call. | 556 // projection Nodes, so they must be scheduled next to the call. |
557 // Collect all the defined registers. | 557 // Collect all the defined registers. |
558 for (DUIterator_Fast imax, i = mcall->fast_outs(imax); i < imax; i++) { | 558 for (DUIterator_Fast imax, i = mcall->fast_outs(imax); i < imax; i++) { |
559 Node* n = mcall->fast_out(i); | 559 Node* n = mcall->fast_out(i); |
560 assert( n->Opcode()==Op_MachProj, "" ); | 560 assert( n->is_MachProj(), "" ); |
561 --ready_cnt[n->_idx]; | 561 --ready_cnt[n->_idx]; |
562 assert( !ready_cnt[n->_idx], "" ); | 562 assert( !ready_cnt[n->_idx], "" ); |
563 // Schedule next to call | 563 // Schedule next to call |
564 _nodes.map(node_cnt++, n); | 564 _nodes.map(node_cnt++, n); |
565 // Collect defined registers | 565 // Collect defined registers |
973 // End of region to clone | 973 // End of region to clone |
974 uint end = end_idx(); | 974 uint end = end_idx(); |
975 if( !_nodes[end]->is_Catch() ) return; | 975 if( !_nodes[end]->is_Catch() ) return; |
976 // Start of region to clone | 976 // Start of region to clone |
977 uint beg = end; | 977 uint beg = end; |
978 while( _nodes[beg-1]->Opcode() != Op_MachProj || | 978 while(!_nodes[beg-1]->is_MachProj() || |
979 !_nodes[beg-1]->in(0)->is_Call() ) { | 979 !_nodes[beg-1]->in(0)->is_MachCall() ) { |
980 beg--; | 980 beg--; |
981 assert(beg > 0,"Catch cleanup walking beyond block boundary"); | 981 assert(beg > 0,"Catch cleanup walking beyond block boundary"); |
982 } | 982 } |
983 // Range of inserted instructions is [beg, end) | 983 // Range of inserted instructions is [beg, end) |
984 if( beg == end ) return; | 984 if( beg == end ) return; |