Mercurial > hg > truffle
annotate src/share/vm/opto/connode.hpp @ 1994:6cd6d394f280
7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed())
7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps
Summary: Relaxed assertion checking related to incremental_collection_failed flag to allow for ExplicitGCInvokesConcurrent behaviour where we do not want a failing scavenge to bail to a stop-world collection. Parameterized incremental_collection_will_fail() so we can selectively use, or not use, as appropriate, the statistical prediction at specific use sites. This essentially reverts the scavenge bail-out logic to what it was prior to some recent changes that had inadvertently started using the statistical prediction which can be noisy in the presence of bursty loads. Added some associated verbose non-product debugging messages.
Reviewed-by: johnc, tonyp
author | ysr |
---|---|
date | Tue, 07 Dec 2010 21:55:53 -0800 |
parents | f95d63e2154a |
children | c124e2e7463e |
rev | line source |
---|---|
0 | 1 /* |
1972 | 2 * Copyright (c) 1997, 2010, 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: | |
39 ConNode( const Type *t ) : TypeNode(t,1) { | |
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 ) { | |
61 return new (C, 1) ConINode( TypeInt::make(con) ); | |
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) | |
76 return new (C, 1) ConPNode( TypePtr::NULL_PTR ) ; | |
77 else | |
78 return new (C, 1) ConPNode( TypeRawPtr::make(con) ); | |
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 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
91 |
0 | 92 //------------------------------ConLNode--------------------------------------- |
93 // Simple long constants | |
94 class ConLNode : public ConNode { | |
95 public: | |
96 ConLNode( const TypeLong *t ) : ConNode(t) {} | |
97 virtual int Opcode() const; | |
98 | |
99 // Factory method: | |
100 static ConLNode* make( Compile *C ,jlong con ) { | |
101 return new (C, 1) ConLNode( TypeLong::make(con) ); | |
102 } | |
103 | |
104 }; | |
105 | |
106 //------------------------------ConFNode--------------------------------------- | |
107 // Simple float constants | |
108 class ConFNode : public ConNode { | |
109 public: | |
110 ConFNode( const TypeF *t ) : ConNode(t) {} | |
111 virtual int Opcode() const; | |
112 | |
113 // Factory method: | |
114 static ConFNode* make( Compile *C, float con ) { | |
115 return new (C, 1) ConFNode( TypeF::make(con) ); | |
116 } | |
117 | |
118 }; | |
119 | |
120 //------------------------------ConDNode--------------------------------------- | |
121 // Simple double constants | |
122 class ConDNode : public ConNode { | |
123 public: | |
124 ConDNode( const TypeD *t ) : ConNode(t) {} | |
125 virtual int Opcode() const; | |
126 | |
127 // Factory method: | |
128 static ConDNode* make( Compile *C, double con ) { | |
129 return new (C, 1) ConDNode( TypeD::make(con) ); | |
130 } | |
131 | |
132 }; | |
133 | |
134 //------------------------------BinaryNode------------------------------------- | |
135 // Place holder for the 2 conditional inputs to a CMove. CMove needs 4 | |
136 // inputs: the Bool (for the lt/gt/eq/ne bits), the flags (result of some | |
137 // compare), and the 2 values to select between. The Matcher requires a | |
138 // binary tree so we break it down like this: | |
139 // (CMove (Binary bol cmp) (Binary src1 src2)) | |
140 class BinaryNode : public Node { | |
141 public: | |
142 BinaryNode( Node *n1, Node *n2 ) : Node(0,n1,n2) { } | |
143 virtual int Opcode() const; | |
144 virtual uint ideal_reg() const { return 0; } | |
145 }; | |
146 | |
147 //------------------------------CMoveNode-------------------------------------- | |
148 // Conditional move | |
149 class CMoveNode : public TypeNode { | |
150 public: | |
151 enum { Control, // When is it safe to do this cmove? | |
152 Condition, // Condition controlling the cmove | |
153 IfFalse, // Value if condition is false | |
154 IfTrue }; // Value if condition is true | |
155 CMoveNode( Node *bol, Node *left, Node *right, const Type *t ) : TypeNode(t,4) | |
156 { | |
157 init_class_id(Class_CMove); | |
158 // all inputs are nullified in Node::Node(int) | |
159 // init_req(Control,NULL); | |
160 init_req(Condition,bol); | |
161 init_req(IfFalse,left); | |
162 init_req(IfTrue,right); | |
163 } | |
164 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
165 virtual const Type *Value( PhaseTransform *phase ) const; | |
166 virtual Node *Identity( PhaseTransform *phase ); | |
167 static CMoveNode *make( Compile *C, Node *c, Node *bol, Node *left, Node *right, const Type *t ); | |
168 // Helper function to spot cmove graph shapes | |
169 static Node *is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f, BoolNode *b ); | |
170 }; | |
171 | |
172 //------------------------------CMoveDNode------------------------------------- | |
173 class CMoveDNode : public CMoveNode { | |
174 public: | |
175 CMoveDNode( Node *bol, Node *left, Node *right, const Type* t) : CMoveNode(bol,left,right,t){} | |
176 virtual int Opcode() const; | |
177 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
178 }; | |
179 | |
180 //------------------------------CMoveFNode------------------------------------- | |
181 class CMoveFNode : public CMoveNode { | |
182 public: | |
183 CMoveFNode( 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 //------------------------------CMoveINode------------------------------------- | |
189 class CMoveINode : public CMoveNode { | |
190 public: | |
191 CMoveINode( Node *bol, Node *left, Node *right, const TypeInt *ti ) : CMoveNode(bol,left,right,ti){} | |
192 virtual int Opcode() const; | |
193 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
194 }; | |
195 | |
196 //------------------------------CMoveLNode------------------------------------- | |
197 class CMoveLNode : public CMoveNode { | |
198 public: | |
199 CMoveLNode(Node *bol, Node *left, Node *right, const TypeLong *tl ) : CMoveNode(bol,left,right,tl){} | |
200 virtual int Opcode() const; | |
201 }; | |
202 | |
203 //------------------------------CMovePNode------------------------------------- | |
204 class CMovePNode : public CMoveNode { | |
205 public: | |
206 CMovePNode( Node *c, Node *bol, Node *left, Node *right, const TypePtr* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); } | |
207 virtual int Opcode() const; | |
208 }; | |
209 | |
164
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
210 //------------------------------CMoveNNode------------------------------------- |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
211 class CMoveNNode : public CMoveNode { |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
212 public: |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
213 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
|
214 virtual int Opcode() const; |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
215 }; |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
216 |
c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
kvn
parents:
163
diff
changeset
|
217 //------------------------------ConstraintCastNode----------------------------- |
0 | 218 // cast to a different range |
219 class ConstraintCastNode: public TypeNode { | |
220 public: | |
221 ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) { | |
222 init_class_id(Class_ConstraintCast); | |
223 init_req(1, n); | |
224 } | |
225 virtual Node *Identity( PhaseTransform *phase ); | |
226 virtual const Type *Value( PhaseTransform *phase ) const; | |
227 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
228 virtual int Opcode() const; | |
229 virtual uint ideal_reg() const = 0; | |
230 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
231 }; | |
232 | |
233 //------------------------------CastIINode------------------------------------- | |
234 // cast integer to integer (different range) | |
235 class CastIINode: public ConstraintCastNode { | |
236 public: | |
237 CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {} | |
238 virtual int Opcode() const; | |
239 virtual uint ideal_reg() const { return Op_RegI; } | |
240 }; | |
241 | |
242 //------------------------------CastPPNode------------------------------------- | |
243 // cast pointer to pointer (different type) | |
244 class CastPPNode: public ConstraintCastNode { | |
245 public: | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
246 CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {} |
0 | 247 virtual int Opcode() const; |
248 virtual uint ideal_reg() const { return Op_RegP; } | |
249 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
250 }; | |
251 | |
252 //------------------------------CheckCastPPNode-------------------------------- | |
253 // for _checkcast, cast pointer to pointer (different type), without JOIN, | |
254 class CheckCastPPNode: public TypeNode { | |
255 public: | |
256 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) { | |
257 init_class_id(Class_CheckCastPP); | |
258 init_req(0, c); | |
259 init_req(1, n); | |
260 } | |
126
72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
kvn
parents:
124
diff
changeset
|
261 |
0 | 262 virtual Node *Identity( PhaseTransform *phase ); |
263 virtual const Type *Value( PhaseTransform *phase ) const; | |
264 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
265 virtual int Opcode() const; | |
266 virtual uint ideal_reg() const { return Op_RegP; } | |
267 // No longer remove CheckCast after CCP as it gives me a place to hang | |
268 // the proper address type - which is required to compute anti-deps. | |
269 //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | |
270 }; | |
271 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
272 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
273 //------------------------------EncodeP-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
274 // 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
|
275 // 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
|
276 // may be useful for code generation in the backend. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
277 class EncodePNode : public TypeNode { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
278 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
279 EncodePNode(Node* value, const Type* type): |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
280 TypeNode(type, 2) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
281 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
|
282 init_req(0, NULL); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
283 init_req(1, value); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
284 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
285 virtual int Opcode() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
286 virtual Node *Identity( PhaseTransform *phase ); |
124
b130b98db9cf
6689060: Escape Analysis does not work with Compressed Oops
kvn
parents:
113
diff
changeset
|
287 virtual const Type *Value( PhaseTransform *phase ) const; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
288 virtual uint ideal_reg() const { return Op_RegN; } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
289 |
163 | 290 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
291 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
292 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
293 //------------------------------DecodeN-------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
294 // 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
|
295 // 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
|
296 // may be useful for code generation in the backend. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
297 class DecodeNNode : public TypeNode { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
298 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
299 DecodeNNode(Node* value, const Type* type): |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
300 TypeNode(type, 2) { |
168
7793bd37a336
6705887: Compressed Oops: generate x64 addressing and implicit null checks with narrow oops
kvn
parents:
164
diff
changeset
|
301 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
|
302 init_req(0, NULL); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
303 init_req(1, value); |
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; |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
308 virtual uint ideal_reg() const { return Op_RegP; } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
309 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
310 |
0 | 311 //------------------------------Conv2BNode------------------------------------- |
312 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. | |
313 class Conv2BNode : public Node { | |
314 public: | |
315 Conv2BNode( Node *i ) : Node(0,i) {} | |
316 virtual int Opcode() const; | |
317 virtual const Type *bottom_type() const { return TypeInt::BOOL; } | |
318 virtual Node *Identity( PhaseTransform *phase ); | |
319 virtual const Type *Value( PhaseTransform *phase ) const; | |
320 virtual uint ideal_reg() const { return Op_RegI; } | |
321 }; | |
322 | |
323 // The conversions operations are all Alpha sorted. Please keep it that way! | |
324 //------------------------------ConvD2FNode------------------------------------ | |
325 // Convert double to float | |
326 class ConvD2FNode : public Node { | |
327 public: | |
328 ConvD2FNode( Node *in1 ) : Node(0,in1) {} | |
329 virtual int Opcode() const; | |
330 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
331 virtual const Type *Value( PhaseTransform *phase ) const; | |
332 virtual Node *Identity( PhaseTransform *phase ); | |
333 virtual uint ideal_reg() const { return Op_RegF; } | |
334 }; | |
335 | |
336 //------------------------------ConvD2INode------------------------------------ | |
337 // Convert Double to Integer | |
338 class ConvD2INode : public Node { | |
339 public: | |
340 ConvD2INode( Node *in1 ) : Node(0,in1) {} | |
341 virtual int Opcode() const; | |
342 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
343 virtual const Type *Value( PhaseTransform *phase ) const; | |
344 virtual Node *Identity( PhaseTransform *phase ); | |
345 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
346 virtual uint ideal_reg() const { return Op_RegI; } | |
347 }; | |
348 | |
349 //------------------------------ConvD2LNode------------------------------------ | |
350 // Convert Double to Long | |
351 class ConvD2LNode : public Node { | |
352 public: | |
353 ConvD2LNode( Node *dbl ) : Node(0,dbl) {} | |
354 virtual int Opcode() const; | |
355 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
356 virtual const Type *Value( PhaseTransform *phase ) const; | |
357 virtual Node *Identity( PhaseTransform *phase ); | |
358 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
359 virtual uint ideal_reg() const { return Op_RegL; } | |
360 }; | |
361 | |
362 //------------------------------ConvF2DNode------------------------------------ | |
363 // Convert Float to a Double. | |
364 class ConvF2DNode : public Node { | |
365 public: | |
366 ConvF2DNode( Node *in1 ) : Node(0,in1) {} | |
367 virtual int Opcode() const; | |
368 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
369 virtual const Type *Value( PhaseTransform *phase ) const; | |
370 virtual uint ideal_reg() const { return Op_RegD; } | |
371 }; | |
372 | |
373 //------------------------------ConvF2INode------------------------------------ | |
374 // Convert float to integer | |
375 class ConvF2INode : public Node { | |
376 public: | |
377 ConvF2INode( Node *in1 ) : Node(0,in1) {} | |
378 virtual int Opcode() const; | |
379 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
380 virtual const Type *Value( PhaseTransform *phase ) const; | |
381 virtual Node *Identity( PhaseTransform *phase ); | |
382 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
383 virtual uint ideal_reg() const { return Op_RegI; } | |
384 }; | |
385 | |
386 //------------------------------ConvF2LNode------------------------------------ | |
387 // Convert float to long | |
388 class ConvF2LNode : public Node { | |
389 public: | |
390 ConvF2LNode( Node *in1 ) : Node(0,in1) {} | |
391 virtual int Opcode() const; | |
392 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
393 virtual const Type *Value( PhaseTransform *phase ) const; | |
394 virtual Node *Identity( PhaseTransform *phase ); | |
395 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
396 virtual uint ideal_reg() const { return Op_RegL; } | |
397 }; | |
398 | |
399 //------------------------------ConvI2DNode------------------------------------ | |
400 // Convert Integer to Double | |
401 class ConvI2DNode : public Node { | |
402 public: | |
403 ConvI2DNode( Node *in1 ) : Node(0,in1) {} | |
404 virtual int Opcode() const; | |
405 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
406 virtual const Type *Value( PhaseTransform *phase ) const; | |
407 virtual uint ideal_reg() const { return Op_RegD; } | |
408 }; | |
409 | |
410 //------------------------------ConvI2FNode------------------------------------ | |
411 // Convert Integer to Float | |
412 class ConvI2FNode : public Node { | |
413 public: | |
414 ConvI2FNode( Node *in1 ) : Node(0,in1) {} | |
415 virtual int Opcode() const; | |
416 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
417 virtual const Type *Value( PhaseTransform *phase ) const; | |
418 virtual Node *Identity( PhaseTransform *phase ); | |
419 virtual uint ideal_reg() const { return Op_RegF; } | |
420 }; | |
421 | |
422 //------------------------------ConvI2LNode------------------------------------ | |
423 // Convert integer to long | |
424 class ConvI2LNode : public TypeNode { | |
425 public: | |
426 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT) | |
427 : TypeNode(t, 2) | |
428 { init_req(1, in1); } | |
429 virtual int Opcode() const; | |
430 virtual const Type *Value( PhaseTransform *phase ) const; | |
431 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
432 virtual uint ideal_reg() const { return Op_RegL; } | |
433 }; | |
434 | |
435 //------------------------------ConvL2DNode------------------------------------ | |
436 // Convert Long to Double | |
437 class ConvL2DNode : public Node { | |
438 public: | |
439 ConvL2DNode( Node *in1 ) : Node(0,in1) {} | |
440 virtual int Opcode() const; | |
441 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
442 virtual const Type *Value( PhaseTransform *phase ) const; | |
443 virtual uint ideal_reg() const { return Op_RegD; } | |
444 }; | |
445 | |
446 //------------------------------ConvL2FNode------------------------------------ | |
447 // Convert Long to Float | |
448 class ConvL2FNode : public Node { | |
449 public: | |
450 ConvL2FNode( Node *in1 ) : Node(0,in1) {} | |
451 virtual int Opcode() const; | |
452 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
453 virtual const Type *Value( PhaseTransform *phase ) const; | |
454 virtual uint ideal_reg() const { return Op_RegF; } | |
455 }; | |
456 | |
457 //------------------------------ConvL2INode------------------------------------ | |
458 // Convert long to integer | |
459 class ConvL2INode : public Node { | |
460 public: | |
461 ConvL2INode( Node *in1 ) : Node(0,in1) {} | |
462 virtual int Opcode() const; | |
463 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
464 virtual Node *Identity( PhaseTransform *phase ); | |
465 virtual const Type *Value( PhaseTransform *phase ) const; | |
466 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
467 virtual uint ideal_reg() const { return Op_RegI; } | |
468 }; | |
469 | |
470 //------------------------------CastX2PNode------------------------------------- | |
471 // convert a machine-pointer-sized integer to a raw pointer | |
472 class CastX2PNode : public Node { | |
473 public: | |
474 CastX2PNode( Node *n ) : Node(NULL, n) {} | |
475 virtual int Opcode() const; | |
476 virtual const Type *Value( PhaseTransform *phase ) const; | |
477 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
478 virtual Node *Identity( PhaseTransform *phase ); | |
479 virtual uint ideal_reg() const { return Op_RegP; } | |
480 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
481 }; | |
482 | |
483 //------------------------------CastP2XNode------------------------------------- | |
484 // Used in both 32-bit and 64-bit land. | |
485 // Used for card-marks and unsafe pointer math. | |
486 class CastP2XNode : public Node { | |
487 public: | |
488 CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {} | |
489 virtual int Opcode() const; | |
490 virtual const Type *Value( PhaseTransform *phase ) const; | |
491 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | |
492 virtual Node *Identity( PhaseTransform *phase ); | |
493 virtual uint ideal_reg() const { return Op_RegX; } | |
494 virtual const Type *bottom_type() const { return TypeX_X; } | |
495 // Return false to keep node from moving away from an associated card mark. | |
496 virtual bool depends_only_on_test() const { return false; } | |
497 }; | |
498 | |
499 //------------------------------MemMoveNode------------------------------------ | |
500 // Memory to memory move. Inserted very late, after allocation. | |
501 class MemMoveNode : public Node { | |
502 public: | |
503 MemMoveNode( Node *dst, Node *src ) : Node(0,dst,src) {} | |
504 virtual int Opcode() const; | |
505 }; | |
506 | |
507 //------------------------------ThreadLocalNode-------------------------------- | |
508 // Ideal Node which returns the base of ThreadLocalStorage. | |
509 class ThreadLocalNode : public Node { | |
510 public: | |
511 ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {} | |
512 virtual int Opcode() const; | |
513 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;} | |
514 virtual uint ideal_reg() const { return Op_RegP; } | |
515 }; | |
516 | |
517 //------------------------------LoadReturnPCNode------------------------------- | |
518 class LoadReturnPCNode: public Node { | |
519 public: | |
520 LoadReturnPCNode(Node *c) : Node(c) { } | |
521 virtual int Opcode() const; | |
522 virtual uint ideal_reg() const { return Op_RegP; } | |
523 }; | |
524 | |
525 | |
526 //-----------------------------RoundFloatNode---------------------------------- | |
527 class RoundFloatNode: public Node { | |
528 public: | |
529 RoundFloatNode(Node* c, Node *in1): Node(c, in1) {} | |
530 virtual int Opcode() const; | |
531 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
532 virtual uint ideal_reg() const { return Op_RegF; } | |
533 virtual Node *Identity( PhaseTransform *phase ); | |
534 virtual const Type *Value( PhaseTransform *phase ) const; | |
535 }; | |
536 | |
537 | |
538 //-----------------------------RoundDoubleNode--------------------------------- | |
539 class RoundDoubleNode: public Node { | |
540 public: | |
541 RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {} | |
542 virtual int Opcode() const; | |
543 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
544 virtual uint ideal_reg() const { return Op_RegD; } | |
545 virtual Node *Identity( PhaseTransform *phase ); | |
546 virtual const Type *Value( PhaseTransform *phase ) const; | |
547 }; | |
548 | |
549 //------------------------------Opaque1Node------------------------------------ | |
550 // A node to prevent unwanted optimizations. Allows constant folding. | |
551 // Stops value-numbering, Ideal calls or Identity functions. | |
552 class Opaque1Node : public Node { | |
553 virtual uint hash() const ; // { return NO_HASH; } | |
554 virtual uint cmp( const Node &n ) const; | |
555 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
556 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
|
557 // 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
|
558 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
559 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
560 } |
0 | 561 // Special version for the pre-loop to hold the original loop limit |
562 // 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
|
563 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
|
564 // 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
|
565 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
566 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
567 } |
0 | 568 Node* original_loop_limit() { return req()==3 ? in(2) : NULL; } |
569 virtual int Opcode() const; | |
570 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
571 virtual Node *Identity( PhaseTransform *phase ); | |
572 }; | |
573 | |
574 //------------------------------Opaque2Node------------------------------------ | |
575 // A node to prevent unwanted optimizations. Allows constant folding. Stops | |
576 // value-numbering, most Ideal calls or Identity functions. This Node is | |
577 // specifically designed to prevent the pre-increment value of a loop trip | |
578 // counter from being live out of the bottom of the loop (hence causing the | |
579 // pre- and post-increment values both being live and thus requiring an extra | |
580 // temp register and an extra move). If we "accidentally" optimize through | |
581 // this kind of a Node, we'll get slightly pessimal, but correct, code. Thus | |
582 // it's OK to be slightly sloppy on optimizations here. | |
583 class Opaque2Node : public Node { | |
584 virtual uint hash() const ; // { return NO_HASH; } | |
585 virtual uint cmp( const Node &n ) const; | |
586 public: | |
216
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
587 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
|
588 // 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
|
589 init_flags(Flag_is_macro); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
590 C->add_macro_node(this); |
8d191a7697e2
6715633: when matching a memory node the adr_type should not change
kvn
parents:
168
diff
changeset
|
591 } |
0 | 592 virtual int Opcode() const; |
593 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
594 }; | |
595 | |
596 //----------------------PartialSubtypeCheckNode-------------------------------- | |
597 // The 2nd slow-half of a subtype check. Scan the subklass's 2ndary superklass | |
598 // array for an instance of the superklass. Set a hidden internal cache on a | |
599 // hit (cache is checked with exposed code in gen_subtype_check()). Return | |
600 // not zero for a miss or zero for a hit. | |
601 class PartialSubtypeCheckNode : public Node { | |
602 public: | |
603 PartialSubtypeCheckNode(Node* c, Node* sub, Node* super) : Node(c,sub,super) {} | |
604 virtual int Opcode() const; | |
605 virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | |
606 virtual uint ideal_reg() const { return Op_RegP; } | |
607 }; | |
608 | |
609 // | |
610 class MoveI2FNode : public Node { | |
611 public: | |
612 MoveI2FNode( Node *value ) : Node(0,value) {} | |
613 virtual int Opcode() const; | |
614 virtual const Type *bottom_type() const { return Type::FLOAT; } | |
615 virtual uint ideal_reg() const { return Op_RegF; } | |
616 virtual const Type* Value( PhaseTransform *phase ) const; | |
617 }; | |
618 | |
619 class MoveL2DNode : public Node { | |
620 public: | |
621 MoveL2DNode( Node *value ) : Node(0,value) {} | |
622 virtual int Opcode() const; | |
623 virtual const Type *bottom_type() const { return Type::DOUBLE; } | |
624 virtual uint ideal_reg() const { return Op_RegD; } | |
625 virtual const Type* Value( PhaseTransform *phase ) const; | |
626 }; | |
627 | |
628 class MoveF2INode : public Node { | |
629 public: | |
630 MoveF2INode( Node *value ) : Node(0,value) {} | |
631 virtual int Opcode() const; | |
632 virtual const Type *bottom_type() const { return TypeInt::INT; } | |
633 virtual uint ideal_reg() const { return Op_RegI; } | |
634 virtual const Type* Value( PhaseTransform *phase ) const; | |
635 }; | |
636 | |
637 class MoveD2LNode : public Node { | |
638 public: | |
639 MoveD2LNode( Node *value ) : Node(0,value) {} | |
640 virtual int Opcode() const; | |
641 virtual const Type *bottom_type() const { return TypeLong::LONG; } | |
642 virtual uint ideal_reg() const { return Op_RegL; } | |
643 virtual const Type* Value( PhaseTransform *phase ) const; | |
644 }; | |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
645 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
646 //---------- CountBitsNode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
647 class CountBitsNode : public Node { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
648 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
649 CountBitsNode(Node* in1) : Node(0, in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
650 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
|
651 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
|
652 }; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
653 |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
654 //---------- CountLeadingZerosINode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
655 // 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
|
656 class CountLeadingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
657 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
658 CountLeadingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
659 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
660 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
661 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
662 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
663 //---------- CountLeadingZerosLNode -------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
664 // 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
|
665 class CountLeadingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
666 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
667 CountLeadingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
668 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
669 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
670 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
671 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
672 //---------- CountTrailingZerosINode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
673 // 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
|
674 class CountTrailingZerosINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
675 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
676 CountTrailingZerosINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
677 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
678 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
679 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
680 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
681 //---------- CountTrailingZerosLNode ------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
682 // 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
|
683 class CountTrailingZerosLNode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
684 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
685 CountTrailingZerosLNode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
686 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
687 virtual const Type* Value(PhaseTransform* phase) const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
688 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
689 |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
690 //---------- PopCountINode ----------------------------------------------------- |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
691 // Population count (bit count) of an integer. |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
692 class PopCountINode : public CountBitsNode { |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
693 public: |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
694 PopCountINode(Node* in1) : CountBitsNode(in1) {} |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
695 virtual int Opcode() const; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
696 }; |
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
697 |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
698 //---------- PopCountLNode ----------------------------------------------------- |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
699 // Population count (bit count) of a long. |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
700 class PopCountLNode : public CountBitsNode { |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
701 public: |
775
93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
twisti
parents:
643
diff
changeset
|
702 PopCountLNode(Node* in1) : CountBitsNode(in1) {} |
643
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
703 virtual int Opcode() const; |
c771b7f43bbf
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
twisti
parents:
235
diff
changeset
|
704 }; |
1972 | 705 |
706 #endif // SHARE_VM_OPTO_CONNODE_HPP |