author | enevill |
Wed, 30 Sep 2015 04:35:39 -0400 | |
changeset 33088 | 34fe49ecee13 |
parent 32723 | 56534fb3d71a |
child 33469 | 30f4811eded0 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
25930 | 2 |
* Copyright (c) 2007, 2014, 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 |
|
25930 | 55 |
static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t); |
56 |
static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt); |
|
57 |
static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt); |
|
13104
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 |
||
30624 | 93 |
//------------------------------AddVLNode-------------------------------------- |
94 |
// Vector add long |
|
95 |
class AddVLNode : public VectorNode { |
|
96 |
public: |
|
97 |
AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
98 |
virtual int Opcode() const; |
|
99 |
}; |
|
100 |
||
101 |
//------------------------------AddVFNode-------------------------------------- |
|
102 |
// Vector add float |
|
103 |
class AddVFNode : public VectorNode { |
|
104 |
public: |
|
105 |
AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
106 |
virtual int Opcode() const; |
|
107 |
}; |
|
108 |
||
109 |
//------------------------------AddVDNode-------------------------------------- |
|
110 |
// Vector add double |
|
111 |
class AddVDNode : public VectorNode { |
|
112 |
public: |
|
113 |
AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
114 |
virtual int Opcode() const; |
|
115 |
}; |
|
116 |
||
30211 | 117 |
//------------------------------ReductionNode------------------------------------ |
118 |
// Perform reduction of a vector |
|
119 |
class ReductionNode : public Node { |
|
120 |
public: |
|
121 |
ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {} |
|
122 |
||
123 |
static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt); |
|
124 |
static int opcode(int opc, BasicType bt); |
|
125 |
static bool implemented(int opc, uint vlen, BasicType bt); |
|
126 |
}; |
|
127 |
||
128 |
//------------------------------AddReductionVINode-------------------------------------- |
|
129 |
// Vector add int as a reduction |
|
130 |
class AddReductionVINode : public ReductionNode { |
|
131 |
public: |
|
132 |
AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
133 |
virtual int Opcode() const; |
|
134 |
virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
135 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
136 |
}; |
|
137 |
||
138 |
//------------------------------AddReductionVLNode-------------------------------------- |
|
139 |
// Vector add long as a reduction |
|
140 |
class AddReductionVLNode : public ReductionNode { |
|
141 |
public: |
|
142 |
AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
143 |
virtual int Opcode() const; |
|
144 |
virtual const Type* bottom_type() const { return TypeLong::LONG; } |
|
145 |
virtual uint ideal_reg() const { return Op_RegL; } |
|
146 |
}; |
|
147 |
||
148 |
//------------------------------AddReductionVFNode-------------------------------------- |
|
149 |
// Vector add float as a reduction |
|
150 |
class AddReductionVFNode : public ReductionNode { |
|
151 |
public: |
|
152 |
AddReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
153 |
virtual int Opcode() const; |
|
154 |
virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
155 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
156 |
}; |
|
157 |
||
158 |
//------------------------------AddReductionVDNode-------------------------------------- |
|
159 |
// Vector add double as a reduction |
|
160 |
class AddReductionVDNode : public ReductionNode { |
|
161 |
public: |
|
162 |
AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
163 |
virtual int Opcode() const; |
|
164 |
virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
165 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
166 |
}; |
|
167 |
||
13930 | 168 |
//------------------------------SubVBNode-------------------------------------- |
1 | 169 |
// Vector subtract byte |
170 |
class SubVBNode : public VectorNode { |
|
171 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
172 |
SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 173 |
virtual int Opcode() const; |
174 |
}; |
|
175 |
||
13930 | 176 |
//------------------------------SubVSNode-------------------------------------- |
1 | 177 |
// Vector subtract short |
178 |
class SubVSNode : public VectorNode { |
|
179 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
180 |
SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 181 |
virtual int Opcode() const; |
182 |
}; |
|
183 |
||
13930 | 184 |
//------------------------------SubVINode-------------------------------------- |
1 | 185 |
// Vector subtract int |
186 |
class SubVINode : public VectorNode { |
|
187 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
188 |
SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 189 |
virtual int Opcode() const; |
190 |
}; |
|
191 |
||
13930 | 192 |
//------------------------------SubVLNode-------------------------------------- |
1 | 193 |
// Vector subtract long |
194 |
class SubVLNode : public VectorNode { |
|
195 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
196 |
SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 197 |
virtual int Opcode() const; |
198 |
}; |
|
199 |
||
13930 | 200 |
//------------------------------SubVFNode-------------------------------------- |
1 | 201 |
// Vector subtract float |
202 |
class SubVFNode : public VectorNode { |
|
203 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
204 |
SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 205 |
virtual int Opcode() const; |
206 |
}; |
|
207 |
||
13930 | 208 |
//------------------------------SubVDNode-------------------------------------- |
1 | 209 |
// Vector subtract double |
210 |
class SubVDNode : public VectorNode { |
|
211 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
212 |
SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 213 |
virtual int Opcode() const; |
214 |
}; |
|
215 |
||
13930 | 216 |
//------------------------------MulVSNode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
217 |
// Vector multiply short |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
218 |
class MulVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
219 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
220 |
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
|
221 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
222 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
223 |
|
13930 | 224 |
//------------------------------MulVINode-------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
225 |
// Vector multiply int |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
226 |
class MulVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
227 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
228 |
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
|
229 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
230 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
231 |
|
30624 | 232 |
//------------------------------MulVLNode-------------------------------------- |
233 |
// Vector multiply long |
|
234 |
class MulVLNode : public VectorNode { |
|
235 |
public: |
|
236 |
MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
237 |
virtual int Opcode() const; |
|
238 |
}; |
|
239 |
||
240 |
//------------------------------MulVFNode-------------------------------------- |
|
241 |
// Vector multiply float |
|
242 |
class MulVFNode : public VectorNode { |
|
243 |
public: |
|
244 |
MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
245 |
virtual int Opcode() const; |
|
246 |
}; |
|
247 |
||
248 |
//------------------------------MulVDNode-------------------------------------- |
|
249 |
// Vector multiply double |
|
250 |
class MulVDNode : public VectorNode { |
|
251 |
public: |
|
252 |
MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {} |
|
253 |
virtual int Opcode() const; |
|
254 |
}; |
|
255 |
||
30211 | 256 |
//------------------------------MulReductionVINode-------------------------------------- |
257 |
// Vector multiply int as a reduction |
|
258 |
class MulReductionVINode : public ReductionNode { |
|
259 |
public: |
|
260 |
MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
261 |
virtual int Opcode() const; |
|
262 |
virtual const Type* bottom_type() const { return TypeInt::INT; } |
|
263 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
264 |
}; |
|
265 |
||
30624 | 266 |
//------------------------------MulReductionVLNode-------------------------------------- |
267 |
// Vector multiply int as a reduction |
|
268 |
class MulReductionVLNode : public ReductionNode { |
|
269 |
public: |
|
270 |
MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
1 | 271 |
virtual int Opcode() const; |
30624 | 272 |
virtual const Type* bottom_type() const { return TypeLong::LONG; } |
273 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
1 | 274 |
}; |
275 |
||
30211 | 276 |
//------------------------------MulReductionVFNode-------------------------------------- |
277 |
// Vector multiply float as a reduction |
|
278 |
class MulReductionVFNode : public ReductionNode { |
|
279 |
public: |
|
280 |
MulReductionVFNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
281 |
virtual int Opcode() const; |
|
282 |
virtual const Type* bottom_type() const { return Type::FLOAT; } |
|
283 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
284 |
}; |
|
285 |
||
286 |
//------------------------------MulReductionVDNode-------------------------------------- |
|
287 |
// Vector multiply double as a reduction |
|
288 |
class MulReductionVDNode : public ReductionNode { |
|
289 |
public: |
|
290 |
MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {} |
|
291 |
virtual int Opcode() const; |
|
292 |
virtual const Type* bottom_type() const { return Type::DOUBLE; } |
|
293 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
294 |
}; |
|
295 |
||
13930 | 296 |
//------------------------------DivVFNode-------------------------------------- |
1 | 297 |
// Vector divide float |
298 |
class DivVFNode : public VectorNode { |
|
299 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
300 |
DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 301 |
virtual int Opcode() const; |
302 |
}; |
|
303 |
||
13930 | 304 |
//------------------------------DivVDNode-------------------------------------- |
1 | 305 |
// Vector Divide double |
306 |
class DivVDNode : public VectorNode { |
|
307 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
308 |
DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 309 |
virtual int Opcode() const; |
310 |
}; |
|
311 |
||
33088
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
312 |
//------------------------------AbsVFNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
313 |
// Vector Abs float |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
314 |
class AbsVFNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
315 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
316 |
AbsVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
317 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
318 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
319 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
320 |
//------------------------------AbsVDNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
321 |
// Vector Abs double |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
322 |
class AbsVDNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
323 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
324 |
AbsVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
325 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
326 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
327 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
328 |
//------------------------------NegVFNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
329 |
// Vector Neg float |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
330 |
class NegVFNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
331 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
332 |
NegVFNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
333 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
334 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
335 |
|
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
336 |
//------------------------------NegVDNode-------------------------------------- |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
337 |
// Vector Neg double |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
338 |
class NegVDNode : public VectorNode { |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
339 |
public: |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
340 |
NegVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
341 |
virtual int Opcode() const; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
342 |
}; |
34fe49ecee13
8138583: aarch64: add support for vectorizing fabs/fneg
enevill
parents:
32723
diff
changeset
|
343 |
|
32723
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
344 |
//------------------------------SqrtVDNode-------------------------------------- |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
345 |
// Vector Sqrt double |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
346 |
class SqrtVDNode : public VectorNode { |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
347 |
public: |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
348 |
SqrtVDNode(Node* in, const TypeVect* vt) : VectorNode(in,vt) {} |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
349 |
virtual int Opcode() const; |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
350 |
}; |
56534fb3d71a
8135028: support for vectorizing double precision sqrt
mcberg
parents:
31035
diff
changeset
|
351 |
|
13930 | 352 |
//------------------------------LShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
353 |
// Vector left shift bytes |
1 | 354 |
class LShiftVBNode : public VectorNode { |
355 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
356 |
LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 357 |
virtual int Opcode() const; |
358 |
}; |
|
359 |
||
13930 | 360 |
//------------------------------LShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
361 |
// Vector left shift shorts |
1 | 362 |
class LShiftVSNode : public VectorNode { |
363 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
364 |
LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 365 |
virtual int Opcode() const; |
366 |
}; |
|
367 |
||
13930 | 368 |
//------------------------------LShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
369 |
// Vector left shift ints |
1 | 370 |
class LShiftVINode : public VectorNode { |
371 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
372 |
LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 373 |
virtual int Opcode() const; |
374 |
}; |
|
375 |
||
13930 | 376 |
//------------------------------LShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
377 |
// Vector left shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
378 |
class LShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
379 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
380 |
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
|
381 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
382 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
383 |
|
13930 | 384 |
//------------------------------RShiftVBNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
385 |
// Vector right arithmetic (signed) shift bytes |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
386 |
class RShiftVBNode : public VectorNode { |
1 | 387 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
388 |
RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 389 |
virtual int Opcode() const; |
390 |
}; |
|
391 |
||
13930 | 392 |
//------------------------------RShiftVSNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
393 |
// Vector right arithmetic (signed) shift shorts |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
394 |
class RShiftVSNode : public VectorNode { |
1 | 395 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
396 |
RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 397 |
virtual int Opcode() const; |
398 |
}; |
|
399 |
||
13930 | 400 |
//------------------------------RShiftVINode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
401 |
// Vector right arithmetic (signed) shift ints |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
402 |
class RShiftVINode : public VectorNode { |
1 | 403 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
404 |
RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 405 |
virtual int Opcode() const; |
406 |
}; |
|
407 |
||
13930 | 408 |
//------------------------------RShiftVLNode----------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
409 |
// Vector right arithmetic (signed) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
410 |
class RShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
411 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
412 |
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
|
413 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
414 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
415 |
|
13930 | 416 |
//------------------------------URShiftVBNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
417 |
// Vector right logical (unsigned) shift bytes |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
418 |
class URShiftVBNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
419 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
420 |
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
|
421 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
422 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
423 |
|
13930 | 424 |
//------------------------------URShiftVSNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
425 |
// Vector right logical (unsigned) shift shorts |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
426 |
class URShiftVSNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
427 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
428 |
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
|
429 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
430 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
431 |
|
13930 | 432 |
//------------------------------URShiftVINode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
433 |
// Vector right logical (unsigned) shift ints |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
434 |
class URShiftVINode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
435 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
436 |
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
|
437 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
438 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
439 |
|
13930 | 440 |
//------------------------------URShiftVLNode---------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
441 |
// Vector right logical (unsigned) shift longs |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
442 |
class URShiftVLNode : public VectorNode { |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
443 |
public: |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
444 |
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
|
445 |
virtual int Opcode() const; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
446 |
}; |
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
447 |
|
13930 | 448 |
//------------------------------LShiftCntVNode--------------------------------- |
449 |
// Vector left shift count |
|
450 |
class LShiftCntVNode : public VectorNode { |
|
451 |
public: |
|
452 |
LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
453 |
virtual int Opcode() const; |
|
454 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
455 |
}; |
|
456 |
||
457 |
//------------------------------RShiftCntVNode--------------------------------- |
|
458 |
// Vector right shift count |
|
459 |
class RShiftCntVNode : public VectorNode { |
|
460 |
public: |
|
461 |
RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {} |
|
462 |
virtual int Opcode() const; |
|
463 |
virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); } |
|
464 |
}; |
|
465 |
||
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
466 |
|
1 | 467 |
//------------------------------AndVNode--------------------------------------- |
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
468 |
// Vector and integer |
1 | 469 |
class AndVNode : public VectorNode { |
470 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
471 |
AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 472 |
virtual int Opcode() const; |
473 |
}; |
|
474 |
||
475 |
//------------------------------OrVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
476 |
// Vector or integer |
1 | 477 |
class OrVNode : public VectorNode { |
478 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
479 |
OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 480 |
virtual int Opcode() const; |
481 |
}; |
|
482 |
||
483 |
//------------------------------XorVNode--------------------------------------- |
|
13485
6c7faa516fc6
6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
13104
diff
changeset
|
484 |
// Vector xor integer |
1 | 485 |
class XorVNode : public VectorNode { |
486 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
487 |
XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} |
1 | 488 |
virtual int Opcode() const; |
489 |
}; |
|
490 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
491 |
//================================= M E M O R Y =============================== |
1 | 492 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
493 |
//------------------------------LoadVectorNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
494 |
// Load Vector from memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
495 |
class LoadVectorNode : public LoadNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
496 |
public: |
31035
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
497 |
LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest) |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
498 |
: LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) { |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
499 |
init_class_id(Class_LoadVector); |
1 | 500 |
} |
501 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
502 |
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
|
503 |
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
|
504 |
|
1 | 505 |
virtual int Opcode() const; |
506 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
507 |
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } |
1 | 508 |
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
|
509 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 510 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
511 |
virtual int store_Opcode() const { return Op_StoreVector; } |
1 | 512 |
|
25930 | 513 |
static LoadVectorNode* make(int opc, Node* ctl, Node* mem, |
31035
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
514 |
Node* adr, const TypePtr* atyp, |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
515 |
uint vlen, BasicType bt, |
0f0743952c41
8077504: Unsafe load can loose control dependency and cause crash
roland
parents:
30624
diff
changeset
|
516 |
ControlDependency control_dependency = LoadNode::DependsOnlyOnTest); |
1 | 517 |
}; |
518 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
519 |
//------------------------------StoreVectorNode-------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
520 |
// Store Vector to memory |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
521 |
class StoreVectorNode : public StoreNode { |
1 | 522 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
523 |
StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val) |
22845
d8812d0ff387
8024921: PPC64 (part 113): Extend Load and Store nodes to know about memory ordering
goetz
parents:
13930
diff
changeset
|
524 |
: StoreNode(c, mem, adr, at, val, MemNode::unordered) { |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
525 |
assert(val->is_Vector() || val->is_LoadVector(), "sanity"); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
526 |
init_class_id(Class_StoreVector); |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
527 |
} |
1 | 528 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
529 |
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
|
530 |
uint length() const { return vect_type()->length(); } // Vector length |
1 | 531 |
|
532 |
virtual int Opcode() const; |
|
533 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
534 |
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
|
535 |
virtual BasicType memory_type() const { return T_VOID; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
536 |
virtual int memory_size() const { return vect_type()->length_in_bytes(); } |
1 | 537 |
|
25930 | 538 |
static StoreVectorNode* make(int opc, Node* ctl, Node* mem, |
10255 | 539 |
Node* adr, const TypePtr* atyp, Node* val, |
1 | 540 |
uint vlen); |
541 |
}; |
|
542 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
543 |
|
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
544 |
//=========================Promote_Scalar_to_Vector============================ |
1 | 545 |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
546 |
//------------------------------ReplicateBNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
547 |
// Replicate byte scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
548 |
class ReplicateBNode : public VectorNode { |
1 | 549 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
550 |
ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 551 |
virtual int Opcode() const; |
552 |
}; |
|
553 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
554 |
//------------------------------ReplicateSNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
555 |
// Replicate short scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
556 |
class ReplicateSNode : public VectorNode { |
1 | 557 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
558 |
ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 559 |
virtual int Opcode() const; |
560 |
}; |
|
561 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
562 |
//------------------------------ReplicateINode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
563 |
// Replicate int scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
564 |
class ReplicateINode : public VectorNode { |
1 | 565 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
566 |
ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 567 |
virtual int Opcode() const; |
568 |
}; |
|
569 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
570 |
//------------------------------ReplicateLNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
571 |
// Replicate long scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
572 |
class ReplicateLNode : public VectorNode { |
1 | 573 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
574 |
ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 575 |
virtual int Opcode() const; |
576 |
}; |
|
577 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
578 |
//------------------------------ReplicateFNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
579 |
// Replicate float scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
580 |
class ReplicateFNode : public VectorNode { |
1 | 581 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
582 |
ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 583 |
virtual int Opcode() const; |
584 |
}; |
|
585 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
586 |
//------------------------------ReplicateDNode--------------------------------- |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
587 |
// Replicate double scalar to be vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
588 |
class ReplicateDNode : public VectorNode { |
1 | 589 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
590 |
ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
1 | 591 |
virtual int Opcode() const; |
592 |
}; |
|
593 |
||
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
594 |
//========================Pack_Scalars_into_a_Vector=========================== |
1 | 595 |
|
596 |
//------------------------------PackNode--------------------------------------- |
|
597 |
// Pack parent class (not for code generation). |
|
598 |
class PackNode : public VectorNode { |
|
599 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
600 |
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
|
601 |
PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {} |
1 | 602 |
virtual int Opcode() const; |
603 |
||
13490
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
604 |
void add_opd(Node* n) { |
d19348851d2e
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
13485
diff
changeset
|
605 |
add_req(n); |
1 | 606 |
} |
607 |
||
608 |
// Create a binary tree form for Packs. [lo, hi) (half-open) range |
|
25930 | 609 |
PackNode* binary_tree_pack(int lo, int hi); |
1 | 610 |
|
25930 | 611 |
static PackNode* make(Node* s, uint vlen, BasicType bt); |
1 | 612 |
}; |
613 |
||
13930 | 614 |
//------------------------------PackBNode-------------------------------------- |
1 | 615 |
// Pack byte scalars into vector |
616 |
class PackBNode : public PackNode { |
|
617 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
618 |
PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {} |
1 | 619 |
virtual int Opcode() const; |
620 |
}; |
|
621 |
||
13930 | 622 |
//------------------------------PackSNode-------------------------------------- |
1 | 623 |
// Pack short scalars into a vector |
624 |
class PackSNode : public PackNode { |
|
625 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
626 |
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
|
627 |
PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 628 |
virtual int Opcode() const; |
629 |
}; |
|
630 |
||
13930 | 631 |
//------------------------------PackINode-------------------------------------- |
1 | 632 |
// Pack integer scalars into a vector |
633 |
class PackINode : public PackNode { |
|
634 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
635 |
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
|
636 |
PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 637 |
virtual int Opcode() const; |
638 |
}; |
|
639 |
||
13930 | 640 |
//------------------------------PackLNode-------------------------------------- |
1 | 641 |
// Pack long scalars into a vector |
642 |
class PackLNode : public PackNode { |
|
643 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
644 |
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
|
645 |
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
|
646 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
647 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
648 |
|
13930 | 649 |
//------------------------------Pack2LNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
650 |
// Pack 2 long scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
651 |
class Pack2LNode : public PackNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
652 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
653 |
Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 654 |
virtual int Opcode() const; |
655 |
}; |
|
656 |
||
13930 | 657 |
//------------------------------PackFNode-------------------------------------- |
1 | 658 |
// Pack float scalars into vector |
659 |
class PackFNode : public PackNode { |
|
660 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
661 |
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
|
662 |
PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 663 |
virtual int Opcode() const; |
664 |
}; |
|
665 |
||
13930 | 666 |
//------------------------------PackDNode-------------------------------------- |
1 | 667 |
// Pack double scalars into a vector |
668 |
class PackDNode : public PackNode { |
|
669 |
public: |
|
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
670 |
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
|
671 |
PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 672 |
virtual int Opcode() const; |
673 |
}; |
|
674 |
||
13930 | 675 |
//------------------------------Pack2DNode------------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
676 |
// Pack 2 double scalars into a vector |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
677 |
class Pack2DNode : public PackNode { |
1 | 678 |
public: |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
679 |
Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {} |
1 | 680 |
virtual int Opcode() const; |
681 |
}; |
|
682 |
||
683 |
||
13930 | 684 |
//========================Extract_Scalar_from_Vector=========================== |
1 | 685 |
|
13930 | 686 |
//------------------------------ExtractNode------------------------------------ |
1 | 687 |
// Extract a scalar from a vector at position "pos" |
688 |
class ExtractNode : public Node { |
|
689 |
public: |
|
690 |
ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) { |
|
691 |
assert(in(2)->get_int() >= 0, "positive constants"); |
|
692 |
} |
|
693 |
virtual int Opcode() const; |
|
694 |
uint pos() const { return in(2)->get_int(); } |
|
695 |
||
25930 | 696 |
static Node* make(Node* v, uint position, BasicType bt); |
1 | 697 |
}; |
698 |
||
13930 | 699 |
//------------------------------ExtractBNode----------------------------------- |
1 | 700 |
// Extract a byte from a vector at position "pos" |
701 |
class ExtractBNode : public ExtractNode { |
|
702 |
public: |
|
703 |
ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
704 |
virtual int Opcode() const; |
|
705 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
706 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
707 |
}; |
|
708 |
||
13930 | 709 |
//------------------------------ExtractUBNode---------------------------------- |
13104
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
710 |
// 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
|
711 |
class ExtractUBNode : public ExtractNode { |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
712 |
public: |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
713 |
ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
714 |
virtual int Opcode() const; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
715 |
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
|
716 |
virtual uint ideal_reg() const { return Op_RegI; } |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
717 |
}; |
657b387034fb
7119644: Increase superword's vector size up to 256 bits
kvn
parents:
10255
diff
changeset
|
718 |
|
13930 | 719 |
//------------------------------ExtractCNode----------------------------------- |
1 | 720 |
// Extract a char from a vector at position "pos" |
721 |
class ExtractCNode : public ExtractNode { |
|
722 |
public: |
|
723 |
ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
724 |
virtual int Opcode() const; |
|
725 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
726 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
727 |
}; |
|
728 |
||
13930 | 729 |
//------------------------------ExtractSNode----------------------------------- |
1 | 730 |
// Extract a short from a vector at position "pos" |
731 |
class ExtractSNode : public ExtractNode { |
|
732 |
public: |
|
733 |
ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
734 |
virtual int Opcode() const; |
|
735 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
736 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
737 |
}; |
|
738 |
||
13930 | 739 |
//------------------------------ExtractINode----------------------------------- |
1 | 740 |
// Extract an int from a vector at position "pos" |
741 |
class ExtractINode : public ExtractNode { |
|
742 |
public: |
|
743 |
ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
744 |
virtual int Opcode() const; |
|
745 |
virtual const Type *bottom_type() const { return TypeInt::INT; } |
|
746 |
virtual uint ideal_reg() const { return Op_RegI; } |
|
747 |
}; |
|
748 |
||
13930 | 749 |
//------------------------------ExtractLNode----------------------------------- |
1 | 750 |
// Extract a long from a vector at position "pos" |
751 |
class ExtractLNode : public ExtractNode { |
|
752 |
public: |
|
753 |
ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
754 |
virtual int Opcode() const; |
|
755 |
virtual const Type *bottom_type() const { return TypeLong::LONG; } |
|
756 |
virtual uint ideal_reg() const { return Op_RegL; } |
|
757 |
}; |
|
758 |
||
13930 | 759 |
//------------------------------ExtractFNode----------------------------------- |
1 | 760 |
// Extract a float from a vector at position "pos" |
761 |
class ExtractFNode : public ExtractNode { |
|
762 |
public: |
|
763 |
ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
764 |
virtual int Opcode() const; |
|
765 |
virtual const Type *bottom_type() const { return Type::FLOAT; } |
|
766 |
virtual uint ideal_reg() const { return Op_RegF; } |
|
767 |
}; |
|
768 |
||
13930 | 769 |
//------------------------------ExtractDNode----------------------------------- |
1 | 770 |
// Extract a double from a vector at position "pos" |
771 |
class ExtractDNode : public ExtractNode { |
|
772 |
public: |
|
773 |
ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {} |
|
774 |
virtual int Opcode() const; |
|
775 |
virtual const Type *bottom_type() const { return Type::DOUBLE; } |
|
776 |
virtual uint ideal_reg() const { return Op_RegD; } |
|
777 |
}; |
|
7397 | 778 |
|
779 |
#endif // SHARE_VM_OPTO_VECTORNODE_HPP |