src/share/vm/opto/chaitin.hpp

changeset 7564
9df0d8f65fea
parent 6198
55fb97c4c58d
child 7994
04ff2f6cd0eb
equal deleted inserted replaced
7560:06face256a8c 7564:9df0d8f65fea
576 Block *current_block, Node_List& value, Node_List &regnd, 576 Block *current_block, Node_List& value, Node_List &regnd,
577 OptoReg::Name nreg, OptoReg::Name nreg2); 577 OptoReg::Name nreg, OptoReg::Name nreg2);
578 // Extend the node to LRG mapping 578 // Extend the node to LRG mapping
579 void add_reference( const Node *node, const Node *old_node); 579 void add_reference( const Node *node, const Node *old_node);
580 580
581 // Record the first use of a def in the block for a register.
582 class RegDefUse {
583 Node* _def;
584 Node* _first_use;
585 public:
586 RegDefUse() : _def(NULL), _first_use(NULL) { }
587 Node* def() const { return _def; }
588 Node* first_use() const { return _first_use; }
589
590 void update(Node* def, Node* use) {
591 if (_def != def) {
592 _def = def;
593 _first_use = use;
594 }
595 }
596 void clear() {
597 _def = NULL;
598 _first_use = NULL;
599 }
600 };
601 typedef GrowableArray<RegDefUse> RegToDefUseMap;
602 int possibly_merge_multidef(Node *n, uint k, Block *block, RegToDefUseMap& reg2defuse);
603
604 // Merge nodes that are a part of a multidef lrg and produce the same value within a block.
605 void merge_multidefs();
606
581 private: 607 private:
582 608
583 static int _final_loads, _final_stores, _final_copies, _final_memoves; 609 static int _final_loads, _final_stores, _final_copies, _final_memoves;
584 static double _final_load_cost, _final_store_cost, _final_copy_cost, _final_memove_cost; 610 static double _final_load_cost, _final_store_cost, _final_copy_cost, _final_memove_cost;
585 static int _conserv_coalesce, _conserv_coalesce_pair; 611 static int _conserv_coalesce, _conserv_coalesce_pair;

mercurial