Mercurial > hg > truffle
comparison src/share/vm/opto/chaitin.hpp @ 6179:8c92982cbbc4
7119644: Increase superword's vector size up to 256 bits
Summary: Increase vector size up to 256-bits for YMM AVX registers on x86.
Reviewed-by: never, twisti, roland
author | kvn |
---|---|
date | Fri, 15 Jun 2012 01:25:19 -0700 |
parents | 5da7201222d5 |
children | a1c7f6472621 |
comparison
equal
deleted
inserted
replaced
6146:eba1d5bce9e8 | 6179:8c92982cbbc4 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
97 public: | 97 public: |
98 int compute_mask_size() const { return _mask.is_AllStack() ? 65535 : _mask.Size(); } | 98 int compute_mask_size() const { return _mask.is_AllStack() ? 65535 : _mask.Size(); } |
99 void set_mask_size( int size ) { | 99 void set_mask_size( int size ) { |
100 assert((size == 65535) || (size == (int)_mask.Size()), ""); | 100 assert((size == 65535) || (size == (int)_mask.Size()), ""); |
101 _mask_size = size; | 101 _mask_size = size; |
102 debug_only(_msize_valid=1;) | 102 #ifdef ASSERT |
103 debug_only( if( _num_regs == 2 && !_fat_proj ) _mask.VerifyPairs(); ) | 103 _msize_valid=1; |
104 if (_is_vector) { | |
105 assert(!_fat_proj, "sanity"); | |
106 _mask.verify_sets(_num_regs); | |
107 } else if (_num_regs == 2 && !_fat_proj) { | |
108 _mask.verify_pairs(); | |
109 } | |
110 #endif | |
104 } | 111 } |
105 void compute_set_mask_size() { set_mask_size(compute_mask_size()); } | 112 void compute_set_mask_size() { set_mask_size(compute_mask_size()); } |
106 int mask_size() const { assert( _msize_valid, "mask size not valid" ); | 113 int mask_size() const { assert( _msize_valid, "mask size not valid" ); |
107 return _mask_size; } | 114 return _mask_size; } |
108 // Get the last mask size computed, even if it does not match the | 115 // Get the last mask size computed, even if it does not match the |
114 void SUBTRACT( const RegMask &rm ) { _mask.SUBTRACT(rm); debug_only(_msize_valid=0;)} | 121 void SUBTRACT( const RegMask &rm ) { _mask.SUBTRACT(rm); debug_only(_msize_valid=0;)} |
115 void Clear() { _mask.Clear() ; debug_only(_msize_valid=1); _mask_size = 0; } | 122 void Clear() { _mask.Clear() ; debug_only(_msize_valid=1); _mask_size = 0; } |
116 void Set_All() { _mask.Set_All(); debug_only(_msize_valid=1); _mask_size = RegMask::CHUNK_SIZE; } | 123 void Set_All() { _mask.Set_All(); debug_only(_msize_valid=1); _mask_size = RegMask::CHUNK_SIZE; } |
117 void Insert( OptoReg::Name reg ) { _mask.Insert(reg); debug_only(_msize_valid=0;) } | 124 void Insert( OptoReg::Name reg ) { _mask.Insert(reg); debug_only(_msize_valid=0;) } |
118 void Remove( OptoReg::Name reg ) { _mask.Remove(reg); debug_only(_msize_valid=0;) } | 125 void Remove( OptoReg::Name reg ) { _mask.Remove(reg); debug_only(_msize_valid=0;) } |
119 void ClearToPairs() { _mask.ClearToPairs(); debug_only(_msize_valid=0;) } | 126 void clear_to_pairs() { _mask.clear_to_pairs(); debug_only(_msize_valid=0;) } |
127 void clear_to_sets() { _mask.clear_to_sets(_num_regs); debug_only(_msize_valid=0;) } | |
120 | 128 |
121 // Number of registers this live range uses when it colors | 129 // Number of registers this live range uses when it colors |
122 private: | 130 private: |
123 uint8 _num_regs; // 2 for Longs and Doubles, 1 for all else | 131 uint8 _num_regs; // 2 for Longs and Doubles, 1 for all else |
124 // except _num_regs is kill count for fat_proj | 132 // except _num_regs is kill count for fat_proj |
148 // Is this live range just barely "low-degree"? Trivially colorable? | 156 // Is this live range just barely "low-degree"? Trivially colorable? |
149 bool just_lo_degree () const { return degree() == degrees_of_freedom(); } | 157 bool just_lo_degree () const { return degree() == degrees_of_freedom(); } |
150 | 158 |
151 uint _is_oop:1, // Live-range holds an oop | 159 uint _is_oop:1, // Live-range holds an oop |
152 _is_float:1, // True if in float registers | 160 _is_float:1, // True if in float registers |
161 _is_vector:1, // True if in vector registers | |
153 _was_spilled1:1, // True if prior spilling on def | 162 _was_spilled1:1, // True if prior spilling on def |
154 _was_spilled2:1, // True if twice prior spilling on def | 163 _was_spilled2:1, // True if twice prior spilling on def |
155 _is_bound:1, // live range starts life with no | 164 _is_bound:1, // live range starts life with no |
156 // degrees of freedom. | 165 // degrees of freedom. |
157 _direct_conflict:1, // True if def and use registers in conflict | 166 _direct_conflict:1, // True if def and use registers in conflict |