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