author | jlaskey |
Tue, 23 Jul 2013 12:00:29 -0300 | |
changeset 19089 | 51cfdcf21d35 |
parent 13930 | 8df570f94294 |
child 22845 | d8812d0ff387 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
2 |
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
21 |
* questions. |
1 | 22 |
*/ |
23 |
||
7397 | 24 |
#ifndef SHARE_VM_OPTO_VECTORNODE_HPP |
25 |
#define SHARE_VM_OPTO_VECTORNODE_HPP |
|
26 |
||
27 |
#include "opto/matcher.hpp" |
|
28 |
#include "opto/memnode.hpp" |
|
29 |
#include "opto/node.hpp" |
|
30 |
#include "opto/opcodes.hpp" |
|
31 |
||
13930 | 32 |
//------------------------------VectorNode------------------------------------- |
1 | 33 |
// Vector Operation |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
34 |
class VectorNode : public TypeNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
35 |
public: |
1 | 36 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
37 |
VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
38 |
init_class_id(Class_Vector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
39 |
init_req(1, n1); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
40 |
} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
41 |
VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
42 |
init_class_id(Class_Vector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
43 |
init_req(1, n1); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
44 |
init_req(2, n2); |
1 | 45 |
} |
46 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
47 |
const TypeVect* vect_type() const { return type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
48 |
uint length() const { return vect_type()->length(); } // Vector length |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
49 |
uint length_in_bytes() const { return vect_type()->length_in_bytes(); } |
1 | 50 |
|
51 |
virtual int Opcode() const; |
|
52 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
53 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); } |
1 | 54 |
|
55 |
static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t); |
|
13930 | 56 |
static VectorNode* shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt); |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
57 |
static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
58 |
|
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
59 |
static int opcode(int opc, BasicType bt); |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
60 |
static bool implemented(int opc, uint vlen, BasicType bt); |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
61 |
static bool is_shift(Node* n); |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
62 |
static bool is_invariant_vector(Node* n); |
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
63 |
// [Start, end) half-open range defining which operands are vectors |
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
64 |
static void vector_operands(Node* n, uint* start, uint* end); |
1 | 65 |
}; |
66 |
||
13930 | 67 |
//===========================Vector=ALU=Operations============================= |
1 | 68 |
|
13930 | 69 |
//------------------------------AddVBNode-------------------------------------- |
1 | 70 |
// Vector add byte |
71 |
class AddVBNode : public VectorNode { |
|
72 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
73 |
AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 74 |
virtual int Opcode() const; |
75 |
}; |
|
76 |
||
13930 | 77 |
//------------------------------AddVSNode-------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
78 |
// Vector add char/short |
1 | 79 |
class AddVSNode : public VectorNode { |
80 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
81 |
AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 82 |
virtual int Opcode() const; |
83 |
}; |
|
84 |
||
13930 | 85 |
//------------------------------AddVINode-------------------------------------- |
1 | 86 |
// Vector add int |
87 |
class AddVINode : public VectorNode { |
|
88 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
89 |
AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 90 |
virtual int Opcode() const; |
91 |
}; |
|
92 |
||
13930 | 93 |
//------------------------------AddVLNode-------------------------------------- |
1 | 94 |
// Vector add long |
95 |
class AddVLNode : public VectorNode { |
|
96 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
97 |
AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 98 |
virtual int Opcode() const; |
99 |
}; |
|
100 |
||
13930 | 101 |
//------------------------------AddVFNode-------------------------------------- |
1 | 102 |
// Vector add float |
103 |
class AddVFNode : public VectorNode { |
|
104 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
105 |
AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 106 |
virtual int Opcode() const; |
107 |
}; |
|
108 |
||
13930 | 109 |
//------------------------------AddVDNode-------------------------------------- |
1 | 110 |
// Vector add double |
111 |
class AddVDNode : public VectorNode { |
|
112 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
113 |
AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 114 |
virtual int Opcode() const; |
115 |
}; |
|
116 |
||
13930 | 117 |
//------------------------------SubVBNode-------------------------------------- |
1 | 118 |
// Vector subtract byte |
119 |
class SubVBNode : public VectorNode { |
|
120 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
121 |
SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 122 |
virtual int Opcode() const; |
123 |
}; |
|
124 |
||
13930 | 125 |
//------------------------------SubVSNode-------------------------------------- |
1 | 126 |
// Vector subtract short |
127 |
class SubVSNode : public VectorNode { |
|
128 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
129 |
SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 130 |
virtual int Opcode() const; |
131 |
}; |
|
132 |
||
13930 | 133 |
//------------------------------SubVINode-------------------------------------- |
1 | 134 |
// Vector subtract int |
135 |
class SubVINode : public VectorNode { |
|
136 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
137 |
SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 138 |
virtual int Opcode() const; |
139 |
}; |
|
140 |
||
13930 | 141 |
//------------------------------SubVLNode-------------------------------------- |
1 | 142 |
// Vector subtract long |
143 |
class SubVLNode : public VectorNode { |
|
144 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
145 |
SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 146 |
virtual int Opcode() const; |
147 |
}; |
|
148 |
||
13930 | 149 |
//------------------------------SubVFNode-------------------------------------- |
1 | 150 |
// Vector subtract float |
151 |
class SubVFNode : public VectorNode { |
|
152 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
153 |
SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 154 |
virtual int Opcode() const; |
155 |
}; |
|
156 |
||
13930 | 157 |
//------------------------------SubVDNode-------------------------------------- |
1 | 158 |
// Vector subtract double |
159 |
class SubVDNode : public VectorNode { |
|
160 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
161 |
SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 162 |
virtual int Opcode() const; |
163 |
}; |
|
164 |
||
13930 | 165 |
//------------------------------MulVSNode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
166 |
// Vector multiply short |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
167 |
class MulVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
168 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
169 |
MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
170 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
171 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
172 |
|
13930 | 173 |
//------------------------------MulVINode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
174 |
// Vector multiply int |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
175 |
class MulVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
176 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
177 |
MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
178 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
179 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
180 |
|
13930 | 181 |
//------------------------------MulVFNode-------------------------------------- |
1 | 182 |
// Vector multiply float |
183 |
class MulVFNode : public VectorNode { |
|
184 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
185 |
MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 186 |
virtual int Opcode() const; |
187 |
}; |
|
188 |
||
13930 | 189 |
//------------------------------MulVDNode-------------------------------------- |
1 | 190 |
// Vector multiply double |
191 |
class MulVDNode : public VectorNode { |
|
192 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
193 |
MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 194 |
virtual int Opcode() const; |
195 |
}; |
|
196 |
||
13930 | 197 |
//------------------------------DivVFNode-------------------------------------- |
1 | 198 |
// Vector divide float |
199 |
class DivVFNode : public VectorNode { |
|
200 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
201 |
DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 202 |
virtual int Opcode() const; |
203 |
}; |
|
204 |
||
13930 | 205 |
//------------------------------DivVDNode-------------------------------------- |
1 | 206 |
// Vector Divide double |
207 |
class DivVDNode : public VectorNode { |
|
208 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
209 |
DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 210 |
virtual int Opcode() const; |
211 |
}; |
|
212 |
||
13930 | 213 |
//------------------------------LShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
214 |
// Vector left shift bytes |
1 | 215 |
class LShiftVBNode : public VectorNode { |
216 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
217 |
LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 218 |
virtual int Opcode() const; |
219 |
}; |
|
220 |
||
13930 | 221 |
//------------------------------LShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
222 |
// Vector left shift shorts |
1 | 223 |
class LShiftVSNode : public VectorNode { |
224 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
225 |
LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 226 |
virtual int Opcode() const; |
227 |
}; |
|
228 |
||
13930 | 229 |
//------------------------------LShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
230 |
// Vector left shift ints |
1 | 231 |
class LShiftVINode : public VectorNode { |
232 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
233 |
LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 234 |
virtual int Opcode() const; |
235 |
}; |
|
236 |
||
13930 | 237 |
//------------------------------LShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
238 |
// Vector left shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
239 |
class LShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
240 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
241 |
LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
242 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
243 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
244 |
|
13930 | 245 |
//------------------------------RShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
246 |
// Vector right arithmetic (signed) shift bytes |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
247 |
class RShiftVBNode : public VectorNode { |
1 | 248 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
249 |
RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 250 |
virtual int Opcode() const; |
251 |
}; |
|
252 |
||
13930 | 253 |
//------------------------------RShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
254 |
// Vector right arithmetic (signed) shift shorts |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
255 |
class RShiftVSNode : public VectorNode { |
1 | 256 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
257 |
RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 258 |
virtual int Opcode() const; |
259 |
}; |
|
260 |
||
13930 | 261 |
//------------------------------RShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
262 |
// Vector right arithmetic (signed) shift ints |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
263 |
class RShiftVINode : public VectorNode { |
1 | 264 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
265 |
RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 266 |
virtual int Opcode() const; |
267 |
}; |
|
268 |
||
13930 | 269 |
//------------------------------RShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
270 |
// Vector right arithmetic (signed) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
271 |
class RShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
272 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
273 |
RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
274 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
275 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
276 |
|
13930 | 277 |
//------------------------------URShiftVBNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
278 |
// Vector right logical (unsigned) shift bytes |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
279 |
class URShiftVBNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
280 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
281 |
URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
282 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
283 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
284 |
|
13930 | 285 |
//------------------------------URShiftVSNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
286 |
// Vector right logical (unsigned) shift shorts |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
287 |
class URShiftVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
288 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
289 |
URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
290 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
291 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
292 |
|
13930 | 293 |
//------------------------------URShiftVINode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
294 |
// Vector right logical (unsigned) shift ints |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
295 |
class URShiftVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
296 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
297 |
URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
298 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
299 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
300 |
|
13930 | 301 |
//------------------------------URShiftVLNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
302 |
// Vector right logical (unsigned) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
303 |
class URShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
304 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
305 |
URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
306 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
307 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
308 |
|
13930 | 309 |
//------------------------------LShiftCntVNode--------------------------------- |
310 |
// Vector left shift count |
|
311 |
class LShiftCntVNode : public VectorNode { |
|
312 |
public: |
|
313 |
LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
314 |
virtual int Opcode() const; |
|
315 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
316 |
}; |
|
317 |
||
318 |
//------------------------------RShiftCntVNode--------------------------------- |
|
319 |
// Vector right shift count |
|
320 |
class RShiftCntVNode : public VectorNode { |
|
321 |
public: |
|
322 |
RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
323 |
virtual int Opcode() const; |
|
324 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
325 |
}; |
|
326 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
327 |
|
1 | 328 |
//------------------------------AndVNode--------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
329 |
// Vector and integer |
1 | 330 |
class AndVNode : public VectorNode { |
331 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
332 |
AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 333 |
virtual int Opcode() const; |
334 |
}; |
|
335 |
||
336 |
//------------------------------OrVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
337 |
// Vector or integer |
1 | 338 |
class OrVNode : public VectorNode { |
339 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
340 |
OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 341 |
virtual int Opcode() const; |
342 |
}; |
|
343 |
||
344 |
//------------------------------XorVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
345 |
// Vector xor integer |
1 | 346 |
class XorVNode : public VectorNode { |
347 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
348 |
XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 349 |
virtual int Opcode() const; |
350 |
}; |
|
351 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
352 |
//================================= M E M O R Y =============================== |
1 | 353 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
354 |
//------------------------------LoadVectorNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
355 |
// Load Vector from memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
356 |
class LoadVectorNode : public LoadNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
357 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
358 |
LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt) |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
359 |
: LoadNode(c, mem, adr, at, vt) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
360 |
init_class_id(Class_LoadVector); |
1 | 361 |
} |
362 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
363 |
const TypeVect* vect_type() const { return type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
364 |
uint length() const { return vect_type()->length(); } // Vector length |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
365 |
|
1 | 366 |
virtual int Opcode() const; |
367 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
368 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } |
1 | 369 |
virtual BasicType memory_type() const { return T_VOID; } |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
370 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 371 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
372 |
virtual int store_Opcode() const { return Op_StoreVector; } |
1 | 373 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
374 |
static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem, |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
375 |
Node* adr, const TypePtr* atyp, uint vlen, BasicType bt); |
1 | 376 |
}; |
377 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
378 |
//------------------------------StoreVectorNode-------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
379 |
// Store Vector to memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
380 |
class StoreVectorNode : public StoreNode { |
1 | 381 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
382 |
StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val) |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
383 |
: StoreNode(c, mem, adr, at, val) { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
384 |
assert(val->is_Vector() || val->is_LoadVector(), "sanity"); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
385 |
init_class_id(Class_StoreVector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
386 |
} |
1 | 387 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
388 |
const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
389 |
uint length() const { return vect_type()->length(); } // Vector length |
1 | 390 |
|
391 |
virtual int Opcode() const; |
|
392 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
393 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
394 |
virtual BasicType memory_type() const { return T_VOID; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
395 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 396 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
397 |
static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem, |
10255 | 398 |
Node* adr, const TypePtr* atyp, Node* val, |
1 | 399 |
uint vlen); |
400 |
}; |
|
401 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
402 |
|
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
403 |
//=========================Promote_Scalar_to_Vector============================ |
1 | 404 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
405 |
//------------------------------ReplicateBNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
406 |
// Replicate byte scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
407 |
class ReplicateBNode : public VectorNode { |
1 | 408 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
409 |
ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 410 |
virtual int Opcode() const; |
411 |
}; |
|
412 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
413 |
//------------------------------ReplicateSNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
414 |
// Replicate short scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
415 |
class ReplicateSNode : public VectorNode { |
1 | 416 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
417 |
ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 418 |
virtual int Opcode() const; |
419 |
}; |
|
420 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
421 |
//------------------------------ReplicateINode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
422 |
// Replicate int scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
423 |
class ReplicateINode : public VectorNode { |
1 | 424 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
425 |
ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 426 |
virtual int Opcode() const; |
427 |
}; |
|
428 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
429 |
//------------------------------ReplicateLNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
430 |
// Replicate long scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
431 |
class ReplicateLNode : public VectorNode { |
1 | 432 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
433 |
ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 434 |
virtual int Opcode() const; |
435 |
}; |
|
436 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
437 |
//------------------------------ReplicateFNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
438 |
// Replicate float scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
439 |
class ReplicateFNode : public VectorNode { |
1 | 440 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
441 |
ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 442 |
virtual int Opcode() const; |
443 |
}; |
|
444 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
445 |
//------------------------------ReplicateDNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
446 |
// Replicate double scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
447 |
class ReplicateDNode : public VectorNode { |
1 | 448 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
449 |
ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 450 |
virtual int Opcode() const; |
451 |
}; |
|
452 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
453 |
//========================Pack_Scalars_into_a_Vector=========================== |
1 | 454 |
|
455 |
//------------------------------PackNode--------------------------------------- |
|
456 |
// Pack parent class (not for code generation). |
|
457 |
class PackNode : public VectorNode { |
|
458 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
459 |
PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
460 |
PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {} |
1 | 461 |
virtual int Opcode() const; |
462 |
||
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
463 |
void add_opd(Node* n) { |
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
464 |
add_req(n); |
1 | 465 |
} |
466 |
||
467 |
// Create a binary tree form for Packs. [lo, hi) (half-open) range |
|
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
468 |
PackNode* binary_tree_pack(Compile* C, int lo, int hi); |
1 | 469 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
470 |
static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt); |
1 | 471 |
}; |
472 |
||
13930 | 473 |
//------------------------------PackBNode-------------------------------------- |
1 | 474 |
// Pack byte scalars into vector |
475 |
class PackBNode : public PackNode { |
|
476 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
477 |
PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
1 | 478 |
virtual int Opcode() const; |
479 |
}; |
|
480 |
||
13930 | 481 |
//------------------------------PackSNode-------------------------------------- |
1 | 482 |
// Pack short scalars into a vector |
483 |
class PackSNode : public PackNode { |
|
484 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
485 |
PackSNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
486 |
PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 487 |
virtual int Opcode() const; |
488 |
}; |
|
489 |
||
13930 | 490 |
//------------------------------PackINode-------------------------------------- |
1 | 491 |
// Pack integer scalars into a vector |
492 |
class PackINode : public PackNode { |
|
493 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
494 |
PackINode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
495 |
PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 496 |
virtual int Opcode() const; |
497 |
}; |
|
498 |
||
13930 | 499 |
//------------------------------PackLNode-------------------------------------- |
1 | 500 |
// Pack long scalars into a vector |
501 |
class PackLNode : public PackNode { |
|
502 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
503 |
PackLNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
504 |
PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
505 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
506 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
507 |
|
13930 | 508 |
//------------------------------Pack2LNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
509 |
// Pack 2 long scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
510 |
class Pack2LNode : public PackNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
511 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
512 |
Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 513 |
virtual int Opcode() const; |
514 |
}; |
|
515 |
||
13930 | 516 |
//------------------------------PackFNode-------------------------------------- |
1 | 517 |
// Pack float scalars into vector |
518 |
class PackFNode : public PackNode { |
|
519 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
520 |
PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
521 |
PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 522 |
virtual int Opcode() const; |
523 |
}; |
|
524 |
||
13930 | 525 |
//------------------------------PackDNode-------------------------------------- |
1 | 526 |
// Pack double scalars into a vector |
527 |
class PackDNode : public PackNode { |
|
528 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
529 |
PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
530 |
PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 531 |
virtual int Opcode() const; |
532 |
}; |
|
533 |
||
13930 | 534 |
//------------------------------Pack2DNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
535 |
// Pack 2 double scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
536 |
class Pack2DNode : public PackNode { |
1 | 537 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
538 |
Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 539 |
virtual int Opcode() const; |
540 |
}; |
|
541 |
||
542 |
||
13930 | 543 |
//========================Extract_Scalar_from_Vector=========================== |
1 | 544 |
|
13930 | 545 |
//------------------------------ExtractNode------------------------------------ |
1 | 546 |
// Extract a scalar from a vector at position "pos" |
547 |
class ExtractNode : public Node { |
|
548 |
public: |
|
549 |
ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) { |
|
550 |
assert(in(2)->get_int() >= 0, "positive constants"); |
|
551 |
} |
|
552 |
virtual int Opcode() const; |
|
553 |
uint pos() const { return in(2)->get_int(); } |
|
554 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
555 |
static Node* make(Compile* C, Node* v, uint position, BasicType bt); |
1 | 556 |
}; |
557 |
||
13930 | 558 |
//------------------------------ExtractBNode----------------------------------- |
1 | 559 |
// Extract a byte from a vector at position "pos" |
560 |
class ExtractBNode : public ExtractNode { |
|
561 |
public: |
|
562 |
ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
563 |
virtual int Opcode() const; |
|
564 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
565 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
566 |
}; |
|
567 |
||
13930 | 568 |
//------------------------------ExtractUBNode---------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
569 |
// Extract a boolean from a vector at position "pos" |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
570 |
class ExtractUBNode : public ExtractNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
571 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
572 |
ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
573 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
574 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
575 |
virtual uint ideal_reg() const { return Op_RegI; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
576 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
577 |
|
13930 | 578 |
//------------------------------ExtractCNode----------------------------------- |
1 | 579 |
// Extract a char from a vector at position "pos" |
580 |
class ExtractCNode : public ExtractNode { |
|
581 |
public: |
|
582 |
ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
583 |
virtual int Opcode() const; |
|
584 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
585 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
586 |
}; |
|
587 |
||
13930 | 588 |
//------------------------------ExtractSNode----------------------------------- |
1 | 589 |
// Extract a short from a vector at position "pos" |
590 |
class ExtractSNode : public ExtractNode { |
|
591 |
public: |
|
592 |
ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
593 |
virtual int Opcode() const; |
|
594 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
595 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
596 |
}; |
|
597 |
||
13930 | 598 |
//------------------------------ExtractINode----------------------------------- |
1 | 599 |
// Extract an int from a vector at position "pos" |
600 |
class ExtractINode : public ExtractNode { |
|
601 |
public: |
|
602 |
ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
603 |
virtual int Opcode() const; |
|
604 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
605 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
606 |
}; |
|
607 |
||
13930 | 608 |
//------------------------------ExtractLNode----------------------------------- |
1 | 609 |
// Extract a long from a vector at position "pos" |
610 |
class ExtractLNode : public ExtractNode { |
|
611 |
public: |
|
612 |
ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
613 |
virtual int Opcode() const; |
|
614 |
virtual const Type *bottom_type() const { return TypeLong::LONG; } |
|
615 |
virtual uint ideal_reg() const { return Op_RegL; } |
|
616 |
}; |
|
617 |
||
13930 | 618 |
//------------------------------ExtractFNode----------------------------------- |
1 | 619 |
// Extract a float from a vector at position "pos" |
620 |
class ExtractFNode : public ExtractNode { |
|
621 |
public: |
|
622 |
ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
623 |
virtual int Opcode() const; |
|
624 |
virtual const Type *bottom_type() const { return Type::FLOAT; } |
|
625 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
626 |
}; |
|
627 |
||
13930 | 628 |
//------------------------------ExtractDNode----------------------------------- |
1 | 629 |
// Extract a double from a vector at position "pos" |
630 |
class ExtractDNode : public ExtractNode { |
|
631 |
public: |
|
632 |
ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
633 |
virtual int Opcode() const; |
|
634 |
virtual const Type *bottom_type() const { return Type::DOUBLE; } |
|
635 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
636 |
}; |
|
7397 | 637 |
|
638 |
#endif // SHARE_VM_OPTO_VECTORNODE_HPP |