1.1 --- a/src/share/vm/opto/chaitin.hpp Mon Jan 12 15:24:29 2015 +0100 1.2 +++ b/src/share/vm/opto/chaitin.hpp Tue Jan 20 13:56:02 2015 -0800 1.3 @@ -578,6 +578,32 @@ 1.4 // Extend the node to LRG mapping 1.5 void add_reference( const Node *node, const Node *old_node); 1.6 1.7 + // Record the first use of a def in the block for a register. 1.8 + class RegDefUse { 1.9 + Node* _def; 1.10 + Node* _first_use; 1.11 + public: 1.12 + RegDefUse() : _def(NULL), _first_use(NULL) { } 1.13 + Node* def() const { return _def; } 1.14 + Node* first_use() const { return _first_use; } 1.15 + 1.16 + void update(Node* def, Node* use) { 1.17 + if (_def != def) { 1.18 + _def = def; 1.19 + _first_use = use; 1.20 + } 1.21 + } 1.22 + void clear() { 1.23 + _def = NULL; 1.24 + _first_use = NULL; 1.25 + } 1.26 + }; 1.27 + typedef GrowableArray<RegDefUse> RegToDefUseMap; 1.28 + int possibly_merge_multidef(Node *n, uint k, Block *block, RegToDefUseMap& reg2defuse); 1.29 + 1.30 + // Merge nodes that are a part of a multidef lrg and produce the same value within a block. 1.31 + void merge_multidefs(); 1.32 + 1.33 private: 1.34 1.35 static int _final_loads, _final_stores, _final_copies, _final_memoves;