434 // Return TRUE if any spills occured. 435 uint Select( ); 436 // Helper function for select which allows biased coloring 437 OptoReg::Name choose_color( LRG &lrg, int chunk ); 438 // Helper function which implements biasing heuristic 439 OptoReg::Name bias_color( LRG &lrg, int chunk ); 440 441 // Split uncolorable live ranges 442 // Return new number of live ranges 443 uint Split( uint maxlrg ); 444 445 // Copy 'was_spilled'-edness from one Node to another. 446 void copy_was_spilled( Node *src, Node *dst ); 447 // Set the 'spilled_once' or 'spilled_twice' flag on a node. 448 void set_was_spilled( Node *n ); 449 450 // Convert ideal spill-nodes into machine loads & stores 451 // Set C->failing when fixup spills could not complete, node limit exceeded. 452 void fixup_spills(); 453 454 // Post-Allocation peephole copy removal 455 void post_allocate_copy_removal(); 456 Node *skip_copies( Node *c ); 457 int yank_if_dead( Node *old, Block *current_block, Node_List *value, Node_List *regnd ); 458 int elide_copy( Node *n, int k, Block *current_block, Node_List &value, Node_List ®nd, bool can_change_regs ); 459 int use_prior_register( Node *copy, uint idx, Node *def, Block *current_block, Node_List &value, Node_List ®nd ); 460 bool may_be_copy_of_callee( Node *def ) const; 461 462 // If nreg already contains the same constant as val then eliminate it 463 bool eliminate_copy_of_constant(Node* val, Node* n, 464 Block *current_block, Node_List& value, Node_List ®nd, 465 OptoReg::Name nreg, OptoReg::Name nreg2); 466 // Extend the node to LRG mapping 467 void add_reference( const Node *node, const Node *old_node); 468 469 private: 470 471 static int _final_loads, _final_stores, _final_copies, _final_memoves; 472 static double _final_load_cost, _final_store_cost, _final_copy_cost, _final_memove_cost; 473 static int _conserv_coalesce, _conserv_coalesce_pair; | 434 // Return TRUE if any spills occured. 435 uint Select( ); 436 // Helper function for select which allows biased coloring 437 OptoReg::Name choose_color( LRG &lrg, int chunk ); 438 // Helper function which implements biasing heuristic 439 OptoReg::Name bias_color( LRG &lrg, int chunk ); 440 441 // Split uncolorable live ranges 442 // Return new number of live ranges 443 uint Split( uint maxlrg ); 444 445 // Copy 'was_spilled'-edness from one Node to another. 446 void copy_was_spilled( Node *src, Node *dst ); 447 // Set the 'spilled_once' or 'spilled_twice' flag on a node. 448 void set_was_spilled( Node *n ); 449 450 // Convert ideal spill-nodes into machine loads & stores 451 // Set C->failing when fixup spills could not complete, node limit exceeded. 452 void fixup_spills(); 453 454 // Collect blocks with CreateEx node. 455 void PhaseChaitin::collect_ex_blocks(Block_List& ex_blocks); 456 457 // Move CreateEx node to the beginning of its block after phis. 458 void PhaseChaitin::fixup_ex_blocks(Block_List& ex_blocks); 459 460 // Post-Allocation peephole copy removal 461 void post_allocate_copy_removal(); 462 Node *skip_copies( Node *c ); 463 int yank_if_dead( Node *old, Block *current_block, Node_List *value, Node_List *regnd ); 464 int elide_copy( Node *n, int k, Block *current_block, Node_List &value, Node_List ®nd, bool can_change_regs ); 465 int use_prior_register( Node *copy, uint idx, Node *def, Block *current_block, Node_List &value, Node_List ®nd ); 466 bool may_be_copy_of_callee( Node *def ) const; 467 468 // If nreg already contains the same constant as val then eliminate it 469 bool eliminate_copy_of_constant(Node* val, Node* n, 470 Block *current_block, Node_List& value, Node_List ®nd, 471 OptoReg::Name nreg, OptoReg::Name nreg2); 472 // Extend the node to LRG mapping 473 void add_reference( const Node *node, const Node *old_node); 474 475 private: 476 477 static int _final_loads, _final_stores, _final_copies, _final_memoves; 478 static double _final_load_cost, _final_store_cost, _final_copy_cost, _final_memove_cost; 479 static int _conserv_coalesce, _conserv_coalesce_pair; |