Mercurial > hg > truffle
annotate src/share/vm/opto/connode.hpp @ 17716:cdb71841f4bc
6498581: ThreadInterruptTest3 produces wrong output on Windows
Summary: There is race condition between os::interrupt and os::is_interrupted on Windows. In JVM_Sleep(Thread.sleep), check if thread gets interrupted, it may see interrupted but not really interrupted so cause spurious waking up (early return from sleep). Fix by checking if interrupt event really gets set thus prevent false return. For intrinsic of _isInterrupted, on Windows, go fastpath only on bit not set.
Reviewed-by: acorn, kvn
Contributed-by: david.holmes@oracle.com, yumin.qi@oracle.com
author | minqi |
---|---|
date | Wed, 26 Feb 2014 15:20:41 -0800 |
parents | de95063c0e34 |
children | 4ca6dc0799b6 606acabe7b5c |
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 { | |
244 public: | |
245 CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {} | |
246 virtual int Opcode() const; | |
247 virtual uint ideal_reg() const { return Op_RegI; } | |
248 }; | |
249 | |
250 //------------------------------CastPPNode------------------------------------- | |
251 // cast pointer to pointer (different type) | |
252 class CastPPNode: public ConstraintCastNode { | |
253 public: | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
254 CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {} |
0 | 255 virtual int Opcode() const; |
256 virtual uint ideal_reg() const { return Op_RegP; } | |
257 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
258 }; | |
259 | |
260 //------------------------------CheckCastPPNode-------------------------------- | |
261 // for _checkcast, cast pointer to pointer (different type), without JOIN, | |
262 class CheckCastPPNode: public TypeNode { | |
263 public: | |
264 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) { | |
265 init_class_id(Class_CheckCastPP); | |
266 init_req(0, c); | |
267 init_req(1, n); | |
268 } | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
269 |
0 | 270 virtual Node *Identity( PhaseTransform *phase ); |
271 virtual const Type *Value( PhaseTransform *phase ) const; | |
272 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
273 virtual int Opcode() const; | |
274 virtual uint ideal_reg() const { return Op_RegP; } | |
275 // No longer remove CheckCast after CCP as it gives me a place to hang | |
276 // the proper address type - which is required to compute anti-deps. | |
277 //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
278 }; | |
279 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
280 |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
281 //------------------------------EncodeNarrowPtr-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
282 class EncodeNarrowPtrNode : public TypeNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
283 protected: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
284 EncodeNarrowPtrNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
285 TypeNode(type, 2) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
286 init_class_id(Class_EncodeNarrowPtr); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
287 init_req(0, NULL); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
288 init_req(1, value); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
289 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
290 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
291 virtual uint ideal_reg() const { return Op_RegN; } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
292 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
293 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
294 |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
295 //------------------------------EncodeP-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
296 // 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
|
297 // 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
|
298 // may be useful for code generation in the backend. |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
299 class EncodePNode : public EncodeNarrowPtrNode { |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
300 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
301 EncodePNode(Node* value, const Type* type): |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
302 EncodeNarrowPtrNode(value, type) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
303 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
|
304 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
305 virtual int Opcode() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
306 virtual Node *Identity( PhaseTransform *phase ); |
124
b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
kvn
parents:
113
diff
changeset
|
307 virtual const Type *Value( PhaseTransform *phase ) const; |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
308 }; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
309 |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
310 //------------------------------EncodePKlass-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
311 // Encodes a klass pointer into its compressed form |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
312 // 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
|
313 // may be useful for code generation in the backend. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
314 class EncodePKlassNode : public EncodeNarrowPtrNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
315 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
316 EncodePKlassNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
317 EncodeNarrowPtrNode(value, type) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
318 init_class_id(Class_EncodePKlass); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
319 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
320 virtual int Opcode() const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
321 virtual Node *Identity( PhaseTransform *phase ); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
322 virtual const Type *Value( PhaseTransform *phase ) const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
323 }; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
324 |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
325 //------------------------------DecodeNarrowPtr-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
326 class DecodeNarrowPtrNode : public TypeNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
327 protected: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
328 DecodeNarrowPtrNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
329 TypeNode(type, 2) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
330 init_class_id(Class_DecodeNarrowPtr); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
331 init_req(0, NULL); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
332 init_req(1, value); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
333 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
334 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
335 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
|
336 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
337 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
338 //------------------------------DecodeN-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
339 // 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
|
340 // 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
|
341 // may be useful for code generation in the backend. |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
342 class DecodeNNode : public DecodeNarrowPtrNode { |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
343 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
344 DecodeNNode(Node* value, const Type* type): |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
345 DecodeNarrowPtrNode(value, type) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
346 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
|
347 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
348 virtual int Opcode() const; |
124
b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
kvn
parents:
113
diff
changeset
|
349 virtual const Type *Value( PhaseTransform *phase ) const; |
6848
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
350 virtual Node *Identity( PhaseTransform *phase ); |
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 |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
353 //------------------------------DecodeNKlass-------------------------------- |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
354 // Converts a narrow klass pointer into a real klass ptr. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
355 // 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
|
356 // may be useful for code generation in the backend. |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
357 class DecodeNKlassNode : public DecodeNarrowPtrNode { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
358 public: |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
359 DecodeNKlassNode(Node* value, const Type* type): |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
360 DecodeNarrowPtrNode(value, type) { |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
361 init_class_id(Class_DecodeNKlass); |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
362 } |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
363 virtual int Opcode() const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
364 virtual const Type *Value( PhaseTransform *phase ) const; |
8e47bac5643a
7054512: Compress class pointers after perm gen removal
roland
parents:
6804
diff
changeset
|
365 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
|
366 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
367 |
0 | 368 //------------------------------Conv2BNode------------------------------------- |
369 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. | |
370 class Conv2BNode : public Node { | |
371 public: | |
372 Conv2BNode( Node *i ) : Node(0,i) {} | |
373 virtual int Opcode() const; | |
374 virtual const Type *bottom_type() const { return TypeInt::BOOL; } | |
375 virtual Node *Identity( PhaseTransform *phase ); | |
376 virtual const Type *Value( PhaseTransform *phase ) const; | |
377 virtual uint ideal_reg() const { return Op_RegI; } | |
378 }; | |
379 | |
380 // The conversions operations are all Alpha sorted. Please keep it that way! | |
381 //------------------------------ConvD2FNode------------------------------------ | |
382 // Convert double to float | |
383 class ConvD2FNode : public Node { | |
384 public: | |
385 ConvD2FNode( Node *in1 ) : Node(0,in1) {} | |
386 virtual int Opcode() const; | |
387 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
388 virtual const Type *Value( PhaseTransform *phase ) const; | |
389 virtual Node *Identity( PhaseTransform *phase ); | |
390 virtual uint ideal_reg() const { return Op_RegF; } | |
391 }; | |
392 | |
393 //------------------------------ConvD2INode------------------------------------ | |
394 // Convert Double to Integer | |
395 class ConvD2INode : public Node { | |
396 public: | |
397 ConvD2INode( Node *in1 ) : Node(0,in1) {} | |
398 virtual int Opcode() const; | |
399 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
400 virtual const Type *Value( PhaseTransform *phase ) const; | |
401 virtual Node *Identity( PhaseTransform *phase ); | |
402 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
403 virtual uint ideal_reg() const { return Op_RegI; } | |
404 }; | |
405 | |
406 //------------------------------ConvD2LNode------------------------------------ | |
407 // Convert Double to Long | |
408 class ConvD2LNode : public Node { | |
409 public: | |
410 ConvD2LNode( Node *dbl ) : Node(0,dbl) {} | |
411 virtual int Opcode() const; | |
412 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
413 virtual const Type *Value( PhaseTransform *phase ) const; | |
414 virtual Node *Identity( PhaseTransform *phase ); | |
415 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
416 virtual uint ideal_reg() const { return Op_RegL; } | |
417 }; | |
418 | |
419 //------------------------------ConvF2DNode------------------------------------ | |
420 // Convert Float to a Double. | |
421 class ConvF2DNode : public Node { | |
422 public: | |
423 ConvF2DNode( Node *in1 ) : Node(0,in1) {} | |
424 virtual int Opcode() const; | |
425 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
426 virtual const Type *Value( PhaseTransform *phase ) const; | |
427 virtual uint ideal_reg() const { return Op_RegD; } | |
428 }; | |
429 | |
430 //------------------------------ConvF2INode------------------------------------ | |
431 // Convert float to integer | |
432 class ConvF2INode : public Node { | |
433 public: | |
434 ConvF2INode( Node *in1 ) : Node(0,in1) {} | |
435 virtual int Opcode() const; | |
436 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
437 virtual const Type *Value( PhaseTransform *phase ) const; | |
438 virtual Node *Identity( PhaseTransform *phase ); | |
439 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
440 virtual uint ideal_reg() const { return Op_RegI; } | |
441 }; | |
442 | |
443 //------------------------------ConvF2LNode------------------------------------ | |
444 // Convert float to long | |
445 class ConvF2LNode : public Node { | |
446 public: | |
447 ConvF2LNode( Node *in1 ) : Node(0,in1) {} | |
448 virtual int Opcode() const; | |
449 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
450 virtual const Type *Value( PhaseTransform *phase ) const; | |
451 virtual Node *Identity( PhaseTransform *phase ); | |
452 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
453 virtual uint ideal_reg() const { return Op_RegL; } | |
454 }; | |
455 | |
456 //------------------------------ConvI2DNode------------------------------------ | |
457 // Convert Integer to Double | |
458 class ConvI2DNode : public Node { | |
459 public: | |
460 ConvI2DNode( Node *in1 ) : Node(0,in1) {} | |
461 virtual int Opcode() const; | |
462 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
463 virtual const Type *Value( PhaseTransform *phase ) const; | |
464 virtual uint ideal_reg() const { return Op_RegD; } | |
465 }; | |
466 | |
467 //------------------------------ConvI2FNode------------------------------------ | |
468 // Convert Integer to Float | |
469 class ConvI2FNode : public Node { | |
470 public: | |
471 ConvI2FNode( Node *in1 ) : Node(0,in1) {} | |
472 virtual int Opcode() const; | |
473 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
474 virtual const Type *Value( PhaseTransform *phase ) const; | |
475 virtual Node *Identity( PhaseTransform *phase ); | |
476 virtual uint ideal_reg() const { return Op_RegF; } | |
477 }; | |
478 | |
479 //------------------------------ConvI2LNode------------------------------------ | |
480 // Convert integer to long | |
481 class ConvI2LNode : public TypeNode { | |
482 public: | |
483 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT) | |
484 : TypeNode(t, 2) | |
485 { init_req(1, in1); } | |
486 virtual int Opcode() const; | |
487 virtual const Type *Value( PhaseTransform *phase ) const; | |
488 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
489 virtual uint ideal_reg() const { return Op_RegL; } | |
490 }; | |
491 | |
492 //------------------------------ConvL2DNode------------------------------------ | |
493 // Convert Long to Double | |
494 class ConvL2DNode : public Node { | |
495 public: | |
496 ConvL2DNode( Node *in1 ) : Node(0,in1) {} | |
497 virtual int Opcode() const; | |
498 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
499 virtual const Type *Value( PhaseTransform *phase ) const; | |
500 virtual uint ideal_reg() const { return Op_RegD; } | |
501 }; | |
502 | |
503 //------------------------------ConvL2FNode------------------------------------ | |
504 // Convert Long to Float | |
505 class ConvL2FNode : public Node { | |
506 public: | |
507 ConvL2FNode( Node *in1 ) : Node(0,in1) {} | |
508 virtual int Opcode() const; | |
509 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
510 virtual const Type *Value( PhaseTransform *phase ) const; | |
511 virtual uint ideal_reg() const { return Op_RegF; } | |
512 }; | |
513 | |
514 //------------------------------ConvL2INode------------------------------------ | |
515 // Convert long to integer | |
516 class ConvL2INode : public Node { | |
517 public: | |
518 ConvL2INode( Node *in1 ) : Node(0,in1) {} | |
519 virtual int Opcode() const; | |
520 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
521 virtual Node *Identity( PhaseTransform *phase ); | |
522 virtual const Type *Value( PhaseTransform *phase ) const; | |
523 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
524 virtual uint ideal_reg() const { return Op_RegI; } | |
525 }; | |
526 | |
527 //------------------------------CastX2PNode------------------------------------- | |
528 // convert a machine-pointer-sized integer to a raw pointer | |
529 class CastX2PNode : public Node { | |
530 public: | |
531 CastX2PNode( Node *n ) : Node(NULL, n) {} | |
532 virtual int Opcode() const; | |
533 virtual const Type *Value( PhaseTransform *phase ) const; | |
534 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
535 virtual Node *Identity( PhaseTransform *phase ); | |
536 virtual uint ideal_reg() const { return Op_RegP; } | |
537 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
538 }; | |
539 | |
540 //------------------------------CastP2XNode------------------------------------- | |
541 // Used in both 32-bit and 64-bit land. | |
542 // Used for card-marks and unsafe pointer math. | |
543 class CastP2XNode : public Node { | |
544 public: | |
545 CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {} | |
546 virtual int Opcode() const; | |
547 virtual const Type *Value( PhaseTransform *phase ) const; | |
548 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
549 virtual Node *Identity( PhaseTransform *phase ); | |
550 virtual uint ideal_reg() const { return Op_RegX; } | |
551 virtual const Type *bottom_type() const { return TypeX_X; } | |
552 // Return false to keep node from moving away from an associated card mark. | |
553 virtual bool depends_only_on_test() const { return false; } | |
554 }; | |
555 | |
556 //------------------------------ThreadLocalNode-------------------------------- | |
557 // Ideal Node which returns the base of ThreadLocalStorage. | |
558 class ThreadLocalNode : public Node { | |
559 public: | |
560 ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {} | |
561 virtual int Opcode() const; | |
562 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;} | |
563 virtual uint ideal_reg() const { return Op_RegP; } | |
564 }; | |
565 | |
566 //------------------------------LoadReturnPCNode------------------------------- | |
567 class LoadReturnPCNode: public Node { | |
568 public: | |
569 LoadReturnPCNode(Node *c) : Node(c) { } | |
570 virtual int Opcode() const; | |
571 virtual uint ideal_reg() const { return Op_RegP; } | |
572 }; | |
573 | |
574 | |
575 //-----------------------------RoundFloatNode---------------------------------- | |
576 class RoundFloatNode: public Node { | |
577 public: | |
578 RoundFloatNode(Node* c, Node *in1): Node(c, in1) {} | |
579 virtual int Opcode() const; | |
580 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
581 virtual uint ideal_reg() const { return Op_RegF; } | |
582 virtual Node *Identity( PhaseTransform *phase ); | |
583 virtual const Type *Value( PhaseTransform *phase ) const; | |
584 }; | |
585 | |
586 | |
587 //-----------------------------RoundDoubleNode--------------------------------- | |
588 class RoundDoubleNode: public Node { | |
589 public: | |
590 RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {} | |
591 virtual int Opcode() const; | |
592 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
593 virtual uint ideal_reg() const { return Op_RegD; } | |
594 virtual Node *Identity( PhaseTransform *phase ); | |
595 virtual const Type *Value( PhaseTransform *phase ) const; | |
596 }; | |
597 | |
598 //------------------------------Opaque1Node------------------------------------ | |
599 // A node to prevent unwanted optimizations. Allows constant folding. | |
600 // Stops value-numbering, Ideal calls or Identity functions. | |
601 class Opaque1Node : public Node { | |
602 virtual uint hash() const ; // { return NO_HASH; } | |
603 virtual uint cmp( const Node &n ) const; | |
604 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
605 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
|
606 // 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
|
607 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
608 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
609 } |
0 | 610 // Special version for the pre-loop to hold the original loop limit |
611 // 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
|
612 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
|
613 // 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
|
614 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
615 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
616 } |
0 | 617 Node* original_loop_limit() { return req()==3 ? in(2) : NULL; } |
618 virtual int Opcode() const; | |
619 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
620 virtual Node *Identity( PhaseTransform *phase ); | |
621 }; | |
622 | |
623 //------------------------------Opaque2Node------------------------------------ | |
624 // A node to prevent unwanted optimizations. Allows constant folding. Stops | |
625 // value-numbering, most Ideal calls or Identity functions. This Node is | |
626 // specifically designed to prevent the pre-increment value of a loop trip | |
627 // counter from being live out of the bottom of the loop (hence causing the | |
628 // pre- and post-increment values both being live and thus requiring an extra | |
629 // temp register and an extra move). If we "accidentally" optimize through | |
630 // this kind of a Node, we'll get slightly pessimal, but correct, code. Thus | |
631 // it's OK to be slightly sloppy on optimizations here. | |
632 class Opaque2Node : public Node { | |
633 virtual uint hash() const ; // { return NO_HASH; } | |
634 virtual uint cmp( const Node &n ) const; | |
635 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
636 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
|
637 // 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
|
638 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
639 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
640 } |
0 | 641 virtual int Opcode() const; |
642 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
643 }; | |
644 | |
645 //----------------------PartialSubtypeCheckNode-------------------------------- | |
646 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass | |
647 // array for an instance of the superklass. Set a hidden internal cache on a | |
648 // hit (cache is checked with exposed code in gen_subtype_check()). Return | |
649 // not zero for a miss or zero for a hit. | |
650 class PartialSubtypeCheckNode : public Node { | |
651 public: | |
652 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {} | |
653 virtual int Opcode() const; | |
654 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
655 virtual uint ideal_reg() const { return Op_RegP; } | |
656 }; | |
657 | |
658 // | |
659 class MoveI2FNode : public Node { | |
660 public: | |
661 MoveI2FNode( Node *value ) : Node(0,value) {} | |
662 virtual int Opcode() const; | |
663 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
664 virtual uint ideal_reg() const { return Op_RegF; } | |
665 virtual const Type* Value( PhaseTransform *phase ) const; | |
666 }; | |
667 | |
668 class MoveL2DNode : public Node { | |
669 public: | |
670 MoveL2DNode( Node *value ) : Node(0,value) {} | |
671 virtual int Opcode() const; | |
672 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
673 virtual uint ideal_reg() const { return Op_RegD; } | |
674 virtual const Type* Value( PhaseTransform *phase ) const; | |
675 }; | |
676 | |
677 class MoveF2INode : public Node { | |
678 public: | |
679 MoveF2INode( Node *value ) : Node(0,value) {} | |
680 virtual int Opcode() const; | |
681 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
682 virtual uint ideal_reg() const { return Op_RegI; } | |
683 virtual const Type* Value( PhaseTransform *phase ) const; | |
684 }; | |
685 | |
686 class MoveD2LNode : public Node { | |
687 public: | |
688 MoveD2LNode( Node *value ) : Node(0,value) {} | |
689 virtual int Opcode() const; | |
690 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
691 virtual uint ideal_reg() const { return Op_RegL; } | |
692 virtual const Type* Value( PhaseTransform *phase ) const; | |
693 }; | |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
694 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
695 //---------- CountBitsNode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
696 class CountBitsNode : public Node { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
697 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
698 CountBitsNode(Node* in1) : Node(0, in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
699 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
|
700 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
|
701 }; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
702 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
703 //---------- CountLeadingZerosINode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
704 // 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
|
705 class CountLeadingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
706 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
707 CountLeadingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
708 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
709 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
710 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
711 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
712 //---------- CountLeadingZerosLNode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
713 // 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
|
714 class CountLeadingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
715 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
716 CountLeadingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
717 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
718 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
719 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
720 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
721 //---------- CountTrailingZerosINode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
722 // 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
|
723 class CountTrailingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
724 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
725 CountTrailingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
726 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
727 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
728 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
729 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
730 //---------- CountTrailingZerosLNode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
731 // 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
|
732 class CountTrailingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
733 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
734 CountTrailingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
735 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
736 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
737 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
738 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
739 //---------- PopCountINode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
740 // Population count (bit count) of an integer. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
741 class PopCountINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
742 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
743 PopCountINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
744 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
745 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
746 |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
747 //---------- PopCountLNode ----------------------------------------------------- |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
748 // Population count (bit count) of a long. |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
749 class PopCountLNode : public CountBitsNode { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
750 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
751 PopCountLNode(Node* in1) : CountBitsNode(in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
752 virtual int Opcode() const; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
753 }; |
1972 | 754 |
755 #endif // SHARE_VM_OPTO_CONNODE_HPP |