src/share/vm/opto/chaitin.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/chaitin.hpp	Mon Jan 19 11:36:14 2015
--- new/src/share/vm/opto/chaitin.hpp	Mon Jan 19 11:36:14 2015

*** 679,688 **** --- 679,714 ---- Block *current_block, Node_List& value, Node_List &regnd, OptoReg::Name nreg, OptoReg::Name nreg2); // Extend the node to LRG mapping void add_reference( const Node *node, const Node *old_node); + // Record the first use of a def in the block for a register. + class RegDefUse { + Node* _def; + Node* _first_use; + public: + RegDefUse() : _def(NULL), _first_use(NULL) { } + Node* def() const { return _def; } + Node* first_use() const { return _first_use; } + + void update(Node* def, Node* use) { + if (_def != def) { + _def = def; + _first_use = use; + } + } + void clear() { + _def = NULL; + _first_use = NULL; + } + }; + typedef GrowableArray<RegDefUse> RegToDefUseMap; + int possibly_merge_multidef(Node *n, uint k, Block *block, RegToDefUseMap& reg2defuse); + + // Merge nodes that are a part of a multidef lrg and produce the same value within a block. + void merge_multidefs(); + private: static int _final_loads, _final_stores, _final_copies, _final_memoves; static double _final_load_cost, _final_store_cost, _final_copy_cost, _final_memove_cost; static int _conserv_coalesce, _conserv_coalesce_pair;

src/share/vm/opto/chaitin.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File