Mercurial > hg > graal-jvmci-8
annotate src/share/vm/opto/connode.hpp @ 23799:535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
Summary: Emit CastII to make narrow ConvI2L dependent on the corresponding range check.
Reviewed-by: kvn, roland
author | thartmann |
---|---|
date | Wed, 27 Jan 2016 09:02:51 +0100 |
parents | eb8b5cc64669 |
children | f13e777eb255 |
rev | line source |
---|---|
0 | 1 /* |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
6804
diff
changeset
|
2 * Copyright (c) 1997, 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:
775
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
775
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:
775
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OPTO_CONNODE_HPP |
26 #define SHARE_VM_OPTO_CONNODE_HPP | |
27 | |
28 #include "opto/node.hpp" | |
29 #include "opto/opcodes.hpp" | |
30 #include "opto/type.hpp" | |
31 | |
0 | 32 class PhaseTransform; |
33 class MachNode; | |
34 | |
35 //------------------------------ConNode---------------------------------------- | |
36 // Simple constants | |
37 class ConNode : public TypeNode { | |
38 public: | |
17671
de95063c0e34
8027422: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed
roland
parents:
6853
diff
changeset
|
39 ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) { |
0 | 40 init_req(0, (Node*)Compile::current()->root()); |
41 init_flags(Flag_is_Con); | |
42 } | |
43 virtual int Opcode() const; | |
44 virtual uint hash() const; | |
45 virtual const RegMask &out_RegMask() const { return RegMask::Empty; } | |
46 virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; } | |
47 | |
48 // Polymorphic factory method: | |
49 static ConNode* make( Compile* C, const Type *t ); | |
50 }; | |
51 | |
52 //------------------------------ConINode--------------------------------------- | |
53 // Simple integer constants | |
54 class ConINode : public ConNode { | |
55 public: | |
56 ConINode( const TypeInt *t ) : ConNode(t) {} | |
57 virtual int Opcode() const; | |
58 | |
59 // Factory method: | |
60 static ConINode* make( Compile* C, int con ) { | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
61 return new (C) ConINode( TypeInt::make(con) ); |
0 | 62 } |
63 | |
64 }; | |
65 | |
66 //------------------------------ConPNode--------------------------------------- | |
67 // Simple pointer constants | |
68 class ConPNode : public ConNode { | |
69 public: | |
70 ConPNode( const TypePtr *t ) : ConNode(t) {} | |
71 virtual int Opcode() const; | |
72 | |
73 // Factory methods: | |
74 static ConPNode* make( Compile *C ,address con ) { | |
75 if (con == NULL) | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
76 return new (C) ConPNode( TypePtr::NULL_PTR ) ; |
0 | 77 else |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
78 return new (C) ConPNode( TypeRawPtr::make(con) ); |
0 | 79 } |
80 }; | |
81 | |
82 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
83 //------------------------------ConNNode-------------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
84 // Simple narrow oop constants |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
85 class ConNNode : public ConNode { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
86 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
87 ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
88 virtual int Opcode() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
89 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
90 |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
91 //------------------------------ConNKlassNode--------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
92 // Simple narrow klass constants |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
93 class ConNKlassNode : public ConNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
94 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
95 ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {} |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
96 virtual int Opcode() const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
97 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
98 |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
99 |
0 | 100 //------------------------------ConLNode--------------------------------------- |
101 // Simple long constants | |
102 class ConLNode : public ConNode { | |
103 public: | |
104 ConLNode( const TypeLong *t ) : ConNode(t) {} | |
105 virtual int Opcode() const; | |
106 | |
107 // Factory method: | |
108 static ConLNode* make( Compile *C ,jlong con ) { | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
109 return new (C) ConLNode( TypeLong::make(con) ); |
0 | 110 } |
111 | |
112 }; | |
113 | |
114 //------------------------------ConFNode--------------------------------------- | |
115 // Simple float constants | |
116 class ConFNode : public ConNode { | |
117 public: | |
118 ConFNode( const TypeF *t ) : ConNode(t) {} | |
119 virtual int Opcode() const; | |
120 | |
121 // Factory method: | |
122 static ConFNode* make( Compile *C, float con ) { | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
123 return new (C) ConFNode( TypeF::make(con) ); |
0 | 124 } |
125 | |
126 }; | |
127 | |
128 //------------------------------ConDNode--------------------------------------- | |
129 // Simple double constants | |
130 class ConDNode : public ConNode { | |
131 public: | |
132 ConDNode( const TypeD *t ) : ConNode(t) {} | |
133 virtual int Opcode() const; | |
134 | |
135 // Factory method: | |
136 static ConDNode* make( Compile *C, double con ) { | |
6804
e626685e9f6c
7193318: C2: remove number of inputs requirement from Node's new operator
kvn
parents:
3899
diff
changeset
|
137 return new (C) ConDNode( TypeD::make(con) ); |
0 | 138 } |
139 | |
140 }; | |
141 | |
142 //------------------------------BinaryNode------------------------------------- | |
143 // Place holder for the 2 conditional inputs to a CMove. CMove needs 4 | |
144 // inputs: the Bool (for the lt/gt/eq/ne bits), the flags (result of some | |
145 // compare), and the 2 values to select between. The Matcher requires a | |
146 // binary tree so we break it down like this: | |
147 // (CMove (Binary bol cmp) (Binary src1 src2)) | |
148 class BinaryNode : public Node { | |
149 public: | |
150 BinaryNode( Node *n1, Node *n2 ) : Node(0,n1,n2) { } | |
151 virtual int Opcode() const; | |
152 virtual uint ideal_reg() const { return 0; } | |
153 }; | |
154 | |
155 //------------------------------CMoveNode-------------------------------------- | |
156 // Conditional move | |
157 class CMoveNode : public TypeNode { | |
158 public: | |
159 enum { Control, // When is it safe to do this cmove? | |
160 Condition, // Condition controlling the cmove | |
161 IfFalse, // Value if condition is false | |
162 IfTrue }; // Value if condition is true | |
163 CMoveNode( Node *bol, Node *left, Node *right, const Type *t ) : TypeNode(t,4) | |
164 { | |
165 init_class_id(Class_CMove); | |
166 // all inputs are nullified in Node::Node(int) | |
167 // init_req(Control,NULL); | |
168 init_req(Condition,bol); | |
169 init_req(IfFalse,left); | |
170 init_req(IfTrue,right); | |
171 } | |
172 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
173 virtual const Type *Value( PhaseTransform *phase ) const; | |
174 virtual Node *Identity( PhaseTransform *phase ); | |
175 static CMoveNode *make( Compile *C, Node *c, Node *bol, Node *left, Node *right, const Type *t ); | |
176 // Helper function to spot cmove graph shapes | |
177 static Node *is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f, BoolNode *b ); | |
178 }; | |
179 | |
180 //------------------------------CMoveDNode------------------------------------- | |
181 class CMoveDNode : public CMoveNode { | |
182 public: | |
183 CMoveDNode( Node *bol, Node *left, Node *right, const Type* t) : CMoveNode(bol,left,right,t){} | |
184 virtual int Opcode() const; | |
185 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
186 }; | |
187 | |
188 //------------------------------CMoveFNode------------------------------------- | |
189 class CMoveFNode : public CMoveNode { | |
190 public: | |
191 CMoveFNode( Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) {} | |
192 virtual int Opcode() const; | |
193 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
194 }; | |
195 | |
196 //------------------------------CMoveINode------------------------------------- | |
197 class CMoveINode : public CMoveNode { | |
198 public: | |
199 CMoveINode( Node *bol, Node *left, Node *right, const TypeInt *ti ) : CMoveNode(bol,left,right,ti){} | |
200 virtual int Opcode() const; | |
201 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
202 }; | |
203 | |
204 //------------------------------CMoveLNode------------------------------------- | |
205 class CMoveLNode : public CMoveNode { | |
206 public: | |
207 CMoveLNode(Node *bol, Node *left, Node *right, const TypeLong *tl ) : CMoveNode(bol,left,right,tl){} | |
208 virtual int Opcode() const; | |
209 }; | |
210 | |
211 //------------------------------CMovePNode------------------------------------- | |
212 class CMovePNode : public CMoveNode { | |
213 public: | |
214 CMovePNode( Node *c, Node *bol, Node *left, Node *right, const TypePtr* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); } | |
215 virtual int Opcode() const; | |
216 }; | |
217 | |
164
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
218 //------------------------------CMoveNNode------------------------------------- |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
219 class CMoveNNode : public CMoveNode { |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
220 public: |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
221 CMoveNNode( Node *c, Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); } |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
222 virtual int Opcode() const; |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
223 }; |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
224 |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
225 //------------------------------ConstraintCastNode----------------------------- |
0 | 226 // cast to a different range |
227 class ConstraintCastNode: public TypeNode { | |
228 public: | |
229 ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) { | |
230 init_class_id(Class_ConstraintCast); | |
231 init_req(1, n); | |
232 } | |
233 virtual Node *Identity( PhaseTransform *phase ); | |
234 virtual const Type *Value( PhaseTransform *phase ) const; | |
235 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
236 virtual int Opcode() const; | |
237 virtual uint ideal_reg() const = 0; | |
238 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
239 }; | |
240 | |
241 //------------------------------CastIINode------------------------------------- | |
242 // cast integer to integer (different range) | |
243 class CastIINode: public ConstraintCastNode { | |
20680
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
244 private: |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
245 // Can this node be removed post CCP or does it carry a required dependency? |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
246 const bool _carry_dependency; |
23799
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
247 // Is this node dependent on a range check? |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
248 const bool _range_check_dependency; |
20680
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
249 |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
250 protected: |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
251 virtual uint cmp( const Node &n ) const; |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
252 virtual uint size_of() const; |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
253 |
0 | 254 public: |
23799
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
255 CastIINode(Node *n, const Type *t, bool carry_dependency = false, bool range_check_dependency = false) |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
256 : ConstraintCastNode(n,t), _carry_dependency(carry_dependency), _range_check_dependency(range_check_dependency) { |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
257 init_class_id(Class_CastII); |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
258 } |
0 | 259 virtual int Opcode() const; |
260 virtual uint ideal_reg() const { return Op_RegI; } | |
20680
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
261 virtual Node *Identity( PhaseTransform *phase ); |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
262 virtual const Type *Value( PhaseTransform *phase ) const; |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
263 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); |
23799
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
264 const bool has_range_check() { |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
265 #ifdef _LP64 |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
266 return _range_check_dependency; |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
267 #else |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
268 assert(!_range_check_dependency, "Should not have range check dependency"); |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
269 return false; |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
270 #endif |
535618ab1c04
6675699: need comprehensive fix for unconstrained ConvI2L with narrowed type
thartmann
parents:
22985
diff
changeset
|
271 } |
20680
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
272 #ifndef PRODUCT |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
273 virtual void dump_spec(outputStream *st) const; |
5b8e0f84f00f
8054478: C2: Incorrectly compiled char[] array access crashes JVM
roland
parents:
17780
diff
changeset
|
274 #endif |
0 | 275 }; |
276 | |
277 //------------------------------CastPPNode------------------------------------- | |
278 // cast pointer to pointer (different type) | |
279 class CastPPNode: public ConstraintCastNode { | |
280 public: | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
281 CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {} |
0 | 282 virtual int Opcode() const; |
283 virtual uint ideal_reg() const { return Op_RegP; } | |
284 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
285 }; | |
286 | |
287 //------------------------------CheckCastPPNode-------------------------------- | |
288 // for _checkcast, cast pointer to pointer (different type), without JOIN, | |
289 class CheckCastPPNode: public TypeNode { | |
290 public: | |
291 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) { | |
292 init_class_id(Class_CheckCastPP); | |
293 init_req(0, c); | |
294 init_req(1, n); | |
295 } | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
296 |
0 | 297 virtual Node *Identity( PhaseTransform *phase ); |
298 virtual const Type *Value( PhaseTransform *phase ) const; | |
299 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
300 virtual int Opcode() const; | |
301 virtual uint ideal_reg() const { return Op_RegP; } | |
302 // No longer remove CheckCast after CCP as it gives me a place to hang | |
303 // the proper address type - which is required to compute anti-deps. | |
304 //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
305 }; | |
306 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
307 |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
308 //------------------------------EncodeNarrowPtr-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
309 class EncodeNarrowPtrNode : public TypeNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
310 protected: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
311 EncodeNarrowPtrNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
312 TypeNode(type, 2) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
313 init_class_id(Class_EncodeNarrowPtr); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
314 init_req(0, NULL); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
315 init_req(1, value); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
316 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
317 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
318 virtual uint ideal_reg() const { return Op_RegN; } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
319 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
320 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
321 |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
322 //------------------------------EncodeP-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
323 // Encodes an oop pointers into its compressed form |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
324 // Takes an extra argument which is the real heap base as a long which |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
325 // may be useful for code generation in the backend. |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
326 class EncodePNode : public EncodeNarrowPtrNode { |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
327 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
328 EncodePNode(Node* value, const Type* type): |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
329 EncodeNarrowPtrNode(value, type) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
330 init_class_id(Class_EncodeP); |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
331 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
332 virtual int Opcode() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
333 virtual Node *Identity( PhaseTransform *phase ); |
124
b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
kvn
parents:
113
diff
changeset
|
334 virtual const Type *Value( PhaseTransform *phase ) const; |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
335 }; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
336 |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
337 //------------------------------EncodePKlass-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
338 // Encodes a klass pointer into its compressed form |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
339 // Takes an extra argument which is the real heap base as a long which |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
340 // may be useful for code generation in the backend. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
341 class EncodePKlassNode : public EncodeNarrowPtrNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
342 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
343 EncodePKlassNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
344 EncodeNarrowPtrNode(value, type) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
345 init_class_id(Class_EncodePKlass); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
346 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
347 virtual int Opcode() const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
348 virtual Node *Identity( PhaseTransform *phase ); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
349 virtual const Type *Value( PhaseTransform *phase ) const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
350 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
351 |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
352 //------------------------------DecodeNarrowPtr-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
353 class DecodeNarrowPtrNode : public TypeNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
354 protected: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
355 DecodeNarrowPtrNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
356 TypeNode(type, 2) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
357 init_class_id(Class_DecodeNarrowPtr); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
358 init_req(0, NULL); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
359 init_req(1, value); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
360 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
361 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
362 virtual uint ideal_reg() const { return Op_RegP; } |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
363 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
364 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
365 //------------------------------DecodeN-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
366 // Converts a narrow oop into a real oop ptr. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
367 // Takes an extra argument which is the real heap base as a long which |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
368 // may be useful for code generation in the backend. |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
369 class DecodeNNode : public DecodeNarrowPtrNode { |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
370 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
371 DecodeNNode(Node* value, const Type* type): |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
372 DecodeNarrowPtrNode(value, type) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
373 init_class_id(Class_DecodeN); |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
374 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
375 virtual int Opcode() const; |
124
b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
kvn
parents:
113
diff
changeset
|
376 virtual const Type *Value( PhaseTransform *phase ) const; |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
377 virtual Node *Identity( PhaseTransform *phase ); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
378 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
379 |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
380 //------------------------------DecodeNKlass-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
381 // Converts a narrow klass pointer into a real klass ptr. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
382 // Takes an extra argument which is the real heap base as a long which |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
383 // may be useful for code generation in the backend. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
384 class DecodeNKlassNode : public DecodeNarrowPtrNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
385 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
386 DecodeNKlassNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
387 DecodeNarrowPtrNode(value, type) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
388 init_class_id(Class_DecodeNKlass); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
389 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
390 virtual int Opcode() const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
391 virtual const Type *Value( PhaseTransform *phase ) const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
392 virtual Node *Identity( PhaseTransform *phase ); |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
393 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
394 |
0 | 395 //------------------------------Conv2BNode------------------------------------- |
396 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. | |
397 class Conv2BNode : public Node { | |
398 public: | |
399 Conv2BNode( Node *i ) : Node(0,i) {} | |
400 virtual int Opcode() const; | |
401 virtual const Type *bottom_type() const { return TypeInt::BOOL; } | |
402 virtual Node *Identity( PhaseTransform *phase ); | |
403 virtual const Type *Value( PhaseTransform *phase ) const; | |
404 virtual uint ideal_reg() const { return Op_RegI; } | |
405 }; | |
406 | |
407 // The conversions operations are all Alpha sorted. Please keep it that way! | |
408 //------------------------------ConvD2FNode------------------------------------ | |
409 // Convert double to float | |
410 class ConvD2FNode : public Node { | |
411 public: | |
412 ConvD2FNode( Node *in1 ) : Node(0,in1) {} | |
413 virtual int Opcode() const; | |
414 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
415 virtual const Type *Value( PhaseTransform *phase ) const; | |
416 virtual Node *Identity( PhaseTransform *phase ); | |
417 virtual uint ideal_reg() const { return Op_RegF; } | |
418 }; | |
419 | |
420 //------------------------------ConvD2INode------------------------------------ | |
421 // Convert Double to Integer | |
422 class ConvD2INode : public Node { | |
423 public: | |
424 ConvD2INode( Node *in1 ) : Node(0,in1) {} | |
425 virtual int Opcode() const; | |
426 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
427 virtual const Type *Value( PhaseTransform *phase ) const; | |
428 virtual Node *Identity( PhaseTransform *phase ); | |
429 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
430 virtual uint ideal_reg() const { return Op_RegI; } | |
431 }; | |
432 | |
433 //------------------------------ConvD2LNode------------------------------------ | |
434 // Convert Double to Long | |
435 class ConvD2LNode : public Node { | |
436 public: | |
437 ConvD2LNode( Node *dbl ) : Node(0,dbl) {} | |
438 virtual int Opcode() const; | |
439 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
440 virtual const Type *Value( PhaseTransform *phase ) const; | |
441 virtual Node *Identity( PhaseTransform *phase ); | |
442 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
443 virtual uint ideal_reg() const { return Op_RegL; } | |
444 }; | |
445 | |
446 //------------------------------ConvF2DNode------------------------------------ | |
447 // Convert Float to a Double. | |
448 class ConvF2DNode : public Node { | |
449 public: | |
450 ConvF2DNode( Node *in1 ) : Node(0,in1) {} | |
451 virtual int Opcode() const; | |
452 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
453 virtual const Type *Value( PhaseTransform *phase ) const; | |
454 virtual uint ideal_reg() const { return Op_RegD; } | |
455 }; | |
456 | |
457 //------------------------------ConvF2INode------------------------------------ | |
458 // Convert float to integer | |
459 class ConvF2INode : public Node { | |
460 public: | |
461 ConvF2INode( Node *in1 ) : Node(0,in1) {} | |
462 virtual int Opcode() const; | |
463 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
464 virtual const Type *Value( PhaseTransform *phase ) const; | |
465 virtual Node *Identity( PhaseTransform *phase ); | |
466 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
467 virtual uint ideal_reg() const { return Op_RegI; } | |
468 }; | |
469 | |
470 //------------------------------ConvF2LNode------------------------------------ | |
471 // Convert float to long | |
472 class ConvF2LNode : public Node { | |
473 public: | |
474 ConvF2LNode( Node *in1 ) : Node(0,in1) {} | |
475 virtual int Opcode() const; | |
476 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
477 virtual const Type *Value( PhaseTransform *phase ) const; | |
478 virtual Node *Identity( PhaseTransform *phase ); | |
479 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
480 virtual uint ideal_reg() const { return Op_RegL; } | |
481 }; | |
482 | |
483 //------------------------------ConvI2DNode------------------------------------ | |
484 // Convert Integer to Double | |
485 class ConvI2DNode : public Node { | |
486 public: | |
487 ConvI2DNode( Node *in1 ) : Node(0,in1) {} | |
488 virtual int Opcode() const; | |
489 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
490 virtual const Type *Value( PhaseTransform *phase ) const; | |
491 virtual uint ideal_reg() const { return Op_RegD; } | |
492 }; | |
493 | |
494 //------------------------------ConvI2FNode------------------------------------ | |
495 // Convert Integer to Float | |
496 class ConvI2FNode : public Node { | |
497 public: | |
498 ConvI2FNode( Node *in1 ) : Node(0,in1) {} | |
499 virtual int Opcode() const; | |
500 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
501 virtual const Type *Value( PhaseTransform *phase ) const; | |
502 virtual Node *Identity( PhaseTransform *phase ); | |
503 virtual uint ideal_reg() const { return Op_RegF; } | |
504 }; | |
505 | |
506 //------------------------------ConvI2LNode------------------------------------ | |
507 // Convert integer to long | |
508 class ConvI2LNode : public TypeNode { | |
509 public: | |
510 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT) | |
511 : TypeNode(t, 2) | |
512 { init_req(1, in1); } | |
513 virtual int Opcode() const; | |
514 virtual const Type *Value( PhaseTransform *phase ) const; | |
515 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
516 virtual uint ideal_reg() const { return Op_RegL; } | |
517 }; | |
518 | |
519 //------------------------------ConvL2DNode------------------------------------ | |
520 // Convert Long to Double | |
521 class ConvL2DNode : public Node { | |
522 public: | |
523 ConvL2DNode( Node *in1 ) : Node(0,in1) {} | |
524 virtual int Opcode() const; | |
525 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
526 virtual const Type *Value( PhaseTransform *phase ) const; | |
527 virtual uint ideal_reg() const { return Op_RegD; } | |
528 }; | |
529 | |
530 //------------------------------ConvL2FNode------------------------------------ | |
531 // Convert Long to Float | |
532 class ConvL2FNode : public Node { | |
533 public: | |
534 ConvL2FNode( Node *in1 ) : Node(0,in1) {} | |
535 virtual int Opcode() const; | |
536 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
537 virtual const Type *Value( PhaseTransform *phase ) const; | |
538 virtual uint ideal_reg() const { return Op_RegF; } | |
539 }; | |
540 | |
541 //------------------------------ConvL2INode------------------------------------ | |
542 // Convert long to integer | |
543 class ConvL2INode : public Node { | |
544 public: | |
545 ConvL2INode( Node *in1 ) : Node(0,in1) {} | |
546 virtual int Opcode() const; | |
547 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
548 virtual Node *Identity( PhaseTransform *phase ); | |
549 virtual const Type *Value( PhaseTransform *phase ) const; | |
550 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
551 virtual uint ideal_reg() const { return Op_RegI; } | |
552 }; | |
553 | |
554 //------------------------------CastX2PNode------------------------------------- | |
555 // convert a machine-pointer-sized integer to a raw pointer | |
556 class CastX2PNode : public Node { | |
557 public: | |
558 CastX2PNode( Node *n ) : Node(NULL, n) {} | |
559 virtual int Opcode() const; | |
560 virtual const Type *Value( PhaseTransform *phase ) const; | |
561 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
562 virtual Node *Identity( PhaseTransform *phase ); | |
563 virtual uint ideal_reg() const { return Op_RegP; } | |
564 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
565 }; | |
566 | |
567 //------------------------------CastP2XNode------------------------------------- | |
568 // Used in both 32-bit and 64-bit land. | |
569 // Used for card-marks and unsafe pointer math. | |
570 class CastP2XNode : public Node { | |
571 public: | |
572 CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {} | |
573 virtual int Opcode() const; | |
574 virtual const Type *Value( PhaseTransform *phase ) const; | |
575 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
576 virtual Node *Identity( PhaseTransform *phase ); | |
577 virtual uint ideal_reg() const { return Op_RegX; } | |
578 virtual const Type *bottom_type() const { return TypeX_X; } | |
579 // Return false to keep node from moving away from an associated card mark. | |
580 virtual bool depends_only_on_test() const { return false; } | |
581 }; | |
582 | |
583 //------------------------------ThreadLocalNode-------------------------------- | |
584 // Ideal Node which returns the base of ThreadLocalStorage. | |
585 class ThreadLocalNode : public Node { | |
586 public: | |
587 ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {} | |
588 virtual int Opcode() const; | |
589 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;} | |
590 virtual uint ideal_reg() const { return Op_RegP; } | |
591 }; | |
592 | |
593 //------------------------------LoadReturnPCNode------------------------------- | |
594 class LoadReturnPCNode: public Node { | |
595 public: | |
596 LoadReturnPCNode(Node *c) : Node(c) { } | |
597 virtual int Opcode() const; | |
598 virtual uint ideal_reg() const { return Op_RegP; } | |
599 }; | |
600 | |
601 | |
602 //-----------------------------RoundFloatNode---------------------------------- | |
603 class RoundFloatNode: public Node { | |
604 public: | |
605 RoundFloatNode(Node* c, Node *in1): Node(c, in1) {} | |
606 virtual int Opcode() const; | |
607 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
608 virtual uint ideal_reg() const { return Op_RegF; } | |
609 virtual Node *Identity( PhaseTransform *phase ); | |
610 virtual const Type *Value( PhaseTransform *phase ) const; | |
611 }; | |
612 | |
613 | |
614 //-----------------------------RoundDoubleNode--------------------------------- | |
615 class RoundDoubleNode: public Node { | |
616 public: | |
617 RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {} | |
618 virtual int Opcode() const; | |
619 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
620 virtual uint ideal_reg() const { return Op_RegD; } | |
621 virtual Node *Identity( PhaseTransform *phase ); | |
622 virtual const Type *Value( PhaseTransform *phase ) const; | |
623 }; | |
624 | |
625 //------------------------------Opaque1Node------------------------------------ | |
626 // A node to prevent unwanted optimizations. Allows constant folding. | |
627 // Stops value-numbering, Ideal calls or Identity functions. | |
628 class Opaque1Node : public Node { | |
629 virtual uint hash() const ; // { return NO_HASH; } | |
630 virtual uint cmp( const Node &n ) const; | |
631 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
632 Opaque1Node( Compile* C, Node *n ) : Node(0,n) { |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
633 // Put it on the Macro nodes list to removed during macro nodes expansion. |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
634 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
635 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
636 } |
0 | 637 // Special version for the pre-loop to hold the original loop limit |
638 // which is consumed by range check elimination. | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
639 Opaque1Node( Compile* C, Node *n, Node* orig_limit ) : Node(0,n,orig_limit) { |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
640 // Put it on the Macro nodes list to removed during macro nodes expansion. |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
641 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
642 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
643 } |
0 | 644 Node* original_loop_limit() { return req()==3 ? in(2) : NULL; } |
645 virtual int Opcode() const; | |
646 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
647 virtual Node *Identity( PhaseTransform *phase ); | |
648 }; | |
649 | |
650 //------------------------------Opaque2Node------------------------------------ | |
651 // A node to prevent unwanted optimizations. Allows constant folding. Stops | |
652 // value-numbering, most Ideal calls or Identity functions. This Node is | |
653 // specifically designed to prevent the pre-increment value of a loop trip | |
654 // counter from being live out of the bottom of the loop (hence causing the | |
655 // pre- and post-increment values both being live and thus requiring an extra | |
656 // temp register and an extra move). If we "accidentally" optimize through | |
657 // this kind of a Node, we'll get slightly pessimal, but correct, code. Thus | |
658 // it's OK to be slightly sloppy on optimizations here. | |
659 class Opaque2Node : public Node { | |
660 virtual uint hash() const ; // { return NO_HASH; } | |
661 virtual uint cmp( const Node &n ) const; | |
662 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
663 Opaque2Node( Compile* C, Node *n ) : Node(0,n) { |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
664 // Put it on the Macro nodes list to removed during macro nodes expansion. |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
665 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
666 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
667 } |
0 | 668 virtual int Opcode() const; |
669 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
670 }; | |
671 | |
17780 | 672 //------------------------------Opaque3Node------------------------------------ |
673 // A node to prevent unwanted optimizations. Will be optimized only during | |
674 // macro nodes expansion. | |
675 class Opaque3Node : public Opaque2Node { | |
676 int _opt; // what optimization it was used for | |
677 public: | |
678 enum { RTM_OPT }; | |
679 Opaque3Node(Compile* C, Node *n, int opt) : Opaque2Node(C, n), _opt(opt) {} | |
680 virtual int Opcode() const; | |
681 bool rtm_opt() const { return (_opt == RTM_OPT); } | |
682 }; | |
683 | |
22985
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
684 //------------------------------ProfileBooleanNode------------------------------- |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
685 // A node represents value profile for a boolean during parsing. |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
686 // Once parsing is over, the node goes away (during IGVN). |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
687 // It is used to override branch frequencies from MDO (see has_injected_profile in parse2.cpp). |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
688 class ProfileBooleanNode : public Node { |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
689 uint _false_cnt; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
690 uint _true_cnt; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
691 bool _consumed; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
692 bool _delay_removal; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
693 virtual uint hash() const ; // { return NO_HASH; } |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
694 virtual uint cmp( const Node &n ) const; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
695 public: |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
696 ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n), |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
697 _false_cnt(false_cnt), _true_cnt(true_cnt), _delay_removal(true), _consumed(false) {} |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
698 |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
699 uint false_count() const { return _false_cnt; } |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
700 uint true_count() const { return _true_cnt; } |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
701 |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
702 void consume() { _consumed = true; } |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
703 |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
704 virtual int Opcode() const; |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
705 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
706 virtual Node *Identity(PhaseTransform *phase); |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
707 virtual const Type *bottom_type() const { return TypeInt::BOOL; } |
eb8b5cc64669
8063137: Never-taken branches should be pruned when GWT LambdaForms are shared
vlivanov
parents:
20680
diff
changeset
|
708 }; |
17780 | 709 |
0 | 710 //----------------------PartialSubtypeCheckNode-------------------------------- |
711 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass | |
712 // array for an instance of the superklass. Set a hidden internal cache on a | |
713 // hit (cache is checked with exposed code in gen_subtype_check()). Return | |
714 // not zero for a miss or zero for a hit. | |
715 class PartialSubtypeCheckNode : public Node { | |
716 public: | |
717 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {} | |
718 virtual int Opcode() const; | |
719 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
720 virtual uint ideal_reg() const { return Op_RegP; } | |
721 }; | |
722 | |
723 // | |
724 class MoveI2FNode : public Node { | |
725 public: | |
726 MoveI2FNode( Node *value ) : Node(0,value) {} | |
727 virtual int Opcode() const; | |
728 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
729 virtual uint ideal_reg() const { return Op_RegF; } | |
730 virtual const Type* Value( PhaseTransform *phase ) const; | |
731 }; | |
732 | |
733 class MoveL2DNode : public Node { | |
734 public: | |
735 MoveL2DNode( Node *value ) : Node(0,value) {} | |
736 virtual int Opcode() const; | |
737 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
738 virtual uint ideal_reg() const { return Op_RegD; } | |
739 virtual const Type* Value( PhaseTransform *phase ) const; | |
740 }; | |
741 | |
742 class MoveF2INode : public Node { | |
743 public: | |
744 MoveF2INode( Node *value ) : Node(0,value) {} | |
745 virtual int Opcode() const; | |
746 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
747 virtual uint ideal_reg() const { return Op_RegI; } | |
748 virtual const Type* Value( PhaseTransform *phase ) const; | |
749 }; | |
750 | |
751 class MoveD2LNode : public Node { | |
752 public: | |
753 MoveD2LNode( Node *value ) : Node(0,value) {} | |
754 virtual int Opcode() const; | |
755 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
756 virtual uint ideal_reg() const { return Op_RegL; } | |
757 virtual const Type* Value( PhaseTransform *phase ) const; | |
758 }; | |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
759 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
760 //---------- CountBitsNode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
761 class CountBitsNode : public Node { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
762 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
763 CountBitsNode(Node* in1) : Node(0, in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
764 const Type* bottom_type() const { return TypeInt::INT; } |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
765 virtual uint ideal_reg() const { return Op_RegI; } |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
766 }; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
767 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
768 //---------- CountLeadingZerosINode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
769 // Count leading zeros (0-bit count starting from MSB) of an integer. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
770 class CountLeadingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
771 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
772 CountLeadingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
773 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
774 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
775 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
776 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
777 //---------- CountLeadingZerosLNode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
778 // Count leading zeros (0-bit count starting from MSB) of a long. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
779 class CountLeadingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
780 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
781 CountLeadingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
782 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
783 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
784 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
785 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
786 //---------- CountTrailingZerosINode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
787 // Count trailing zeros (0-bit count starting from LSB) of an integer. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
788 class CountTrailingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
789 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
790 CountTrailingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
791 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
792 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
793 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
794 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
795 //---------- CountTrailingZerosLNode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
796 // Count trailing zeros (0-bit count starting from LSB) of a long. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
797 class CountTrailingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
798 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
799 CountTrailingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
800 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
801 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
802 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
803 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
804 //---------- PopCountINode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
805 // Population count (bit count) of an integer. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
806 class PopCountINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
807 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
808 PopCountINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
809 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
810 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
811 |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
812 //---------- PopCountLNode ----------------------------------------------------- |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
813 // Population count (bit count) of a long. |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
814 class PopCountLNode : public CountBitsNode { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
815 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
816 PopCountLNode(Node* in1) : CountBitsNode(in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
817 virtual int Opcode() const; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
818 }; |
1972 | 819 |
820 #endif // SHARE_VM_OPTO_CONNODE_HPP |