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 Thu Oct 10 15:28:48 2013
--- new/src/share/vm/opto/chaitin.hpp Thu Oct 10 15:28:48 2013
*** 50,59 ****
--- 50,60 ----
//------------------------------LRG--------------------------------------------
// Live-RanGe structure.
class LRG : public ResourceObj {
friend class VMStructs;
public:
+ static const uint LRG_All_STACK_SIZE = 0xFFFFF; // This mask size is used to tell that the mask of this LRG supports stack positions
enum { SPILL_REG=29999 }; // Register number of a spilled LRG
double _cost; // 2 for loads/1 for stores times block freq
double _area; // Sum of all simultaneously live values
double score() const; // Compute score from cost and area
*** 78,105 ****
--- 79,113 ----
void set_reg( OptoReg::Name r ) { _reg = r; }
private:
uint _eff_degree; // Effective degree: Sum of neighbors _num_regs
public:
! int degree() const { assert( _degree_valid , "" ); return _eff_degree; }
// Degree starts not valid and any change to the IFG neighbor
// set makes it not valid.
- void set_degree( uint degree ) { _eff_degree = degree; debug_only(_degree_valid = 1;) }
+ _eff_degree = degree;
+ assert(!_mask.is_AllStack() || (_mask.is_AllStack() && lo_degree()), "_eff_degree can't be bigger than LRG_All_STACK_SIZE - _num_regs if the mask support stack registers");
+ debug_only(_degree_valid = 1;)
+ }
// Made a change that hammered degree
void invalid_degree() { debug_only(_degree_valid=0;) }
// Incrementally modify degree. If it was correct, it should remain correct
- void inc_degree( uint mod ) { _eff_degree += mod; }
+ _eff_degree += mod;
+ assert(!_mask.is_AllStack() || (_mask.is_AllStack() && lo_degree()), "_eff_degree can't be bigger than LRG_All_STACK_SIZE - _num_regs if the mask support stack registers");
+ }
// Compute the degree between 2 live ranges
int compute_degree( LRG &l ) const;
private:
RegMask _mask; // Allowed registers for this LRG
uint _mask_size; // cache of _mask.Size();
public:
! int compute_mask_size() const { return _mask.is_AllStack() ? 65535 : _mask.Size(); }
! int compute_mask_size() const { return _mask.is_AllStack() ? LRG_All_STACK_SIZE : _mask.Size(); }
void set_mask_size( int size ) {
! assert((size == 65535) || (size == (int)_mask.Size()), "");
! assert((size == (int)LRG_All_STACK_SIZE) || (size == (int)_mask.Size()), "");
_mask_size = size;
#ifdef ASSERT
_msize_valid=1;
if (_is_vector) {
assert(!_fat_proj, "sanity");
src/share/vm/opto/chaitin.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File