456 void fixup_spills(); |
456 void fixup_spills(); |
457 |
457 |
458 // Post-Allocation peephole copy removal |
458 // Post-Allocation peephole copy removal |
459 void post_allocate_copy_removal(); |
459 void post_allocate_copy_removal(); |
460 Node *skip_copies( Node *c ); |
460 Node *skip_copies( Node *c ); |
|
461 // Replace the old node with the current live version of that value |
|
462 // and yank the old value if it's dead. |
|
463 int replace_and_yank_if_dead( Node *old, OptoReg::Name nreg, |
|
464 Block *current_block, Node_List& value, Node_List& regnd ) { |
|
465 Node* v = regnd[nreg]; |
|
466 assert(v->outcnt() != 0, "no dead values"); |
|
467 old->replace_by(v); |
|
468 return yank_if_dead(old, current_block, &value, ®nd); |
|
469 } |
|
470 |
461 int yank_if_dead( Node *old, Block *current_block, Node_List *value, Node_List *regnd ); |
471 int yank_if_dead( Node *old, Block *current_block, Node_List *value, Node_List *regnd ); |
462 int elide_copy( Node *n, int k, Block *current_block, Node_List &value, Node_List ®nd, bool can_change_regs ); |
472 int elide_copy( Node *n, int k, Block *current_block, Node_List &value, Node_List ®nd, bool can_change_regs ); |
463 int use_prior_register( Node *copy, uint idx, Node *def, Block *current_block, Node_List &value, Node_List ®nd ); |
473 int use_prior_register( Node *copy, uint idx, Node *def, Block *current_block, Node_List &value, Node_List ®nd ); |
464 bool may_be_copy_of_callee( Node *def ) const; |
474 bool may_be_copy_of_callee( Node *def ) const; |
465 |
475 |