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