annotate src/share/vm/opto/mulnode.hpp @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children f3de1255b035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 // Portions of code courtesy of Clifford Click
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 class PhaseTransform;
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 //------------------------------MulNode----------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // Classic MULTIPLY functionality. This covers all the usual 'multiply'
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // behaviors for an algebraic ring. Multiply-integer, multiply-float,
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // multiply-double, and binary-and are all inherited from this class. The
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // various identity values are supplied by virtual functions.
a61af66fc99e Initial load
duke
parents:
diff changeset
34 class MulNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
35 virtual uint hash() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
36 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
37 MulNode( Node *in1, Node *in2 ): Node(0,in1,in2) {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 init_class_id(Class_Mul);
a61af66fc99e Initial load
duke
parents:
diff changeset
39 }
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // Handle algebraic identities here. If we have an identity, return the Node
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // we are equivalent to. We look for "add of zero" as an identity.
a61af66fc99e Initial load
duke
parents:
diff changeset
43 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 // We also canonicalize the Node, moving constants to the right input,
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // and flatten expressions (so that 1+x+2 becomes x+3).
a61af66fc99e Initial load
duke
parents:
diff changeset
47 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // Compute a new Type for this node. Basically we just do the pre-check,
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // then call the virtual add() to set the type.
a61af66fc99e Initial load
duke
parents:
diff changeset
51 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 // Supplied function returns the product of the inputs.
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // This also type-checks the inputs for sanity. Guaranteed never to
a61af66fc99e Initial load
duke
parents:
diff changeset
55 // be passed a TOP or BOTTOM type, these are filtered out by a pre-check.
a61af66fc99e Initial load
duke
parents:
diff changeset
56 // This call recognizes the multiplicative zero type.
a61af66fc99e Initial load
duke
parents:
diff changeset
57 virtual const Type *mul_ring( const Type *, const Type * ) const = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 // Supplied function to return the multiplicative identity type
a61af66fc99e Initial load
duke
parents:
diff changeset
60 virtual const Type *mul_id() const = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // Supplied function to return the additive identity type
a61af66fc99e Initial load
duke
parents:
diff changeset
63 virtual const Type *add_id() const = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 // Supplied function to return the additive opcode
a61af66fc99e Initial load
duke
parents:
diff changeset
66 virtual int add_opcode() const = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // Supplied function to return the multiplicative opcode
a61af66fc99e Initial load
duke
parents:
diff changeset
69 virtual int mul_opcode() const = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 };
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 //------------------------------MulINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
74 // Multiply 2 integers
a61af66fc99e Initial load
duke
parents:
diff changeset
75 class MulINode : public MulNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
77 MulINode( Node *in1, Node *in2 ) : MulNode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
78 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
79 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
80 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
81 const Type *mul_id() const { return TypeInt::ONE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
82 const Type *add_id() const { return TypeInt::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
83 int add_opcode() const { return Op_AddI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
84 int mul_opcode() const { return Op_MulI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
85 const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
86 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
87 };
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 //------------------------------MulLNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
90 // Multiply 2 longs
a61af66fc99e Initial load
duke
parents:
diff changeset
91 class MulLNode : public MulNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
92 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
93 MulLNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
94 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
95 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
96 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
97 const Type *mul_id() const { return TypeLong::ONE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
98 const Type *add_id() const { return TypeLong::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
99 int add_opcode() const { return Op_AddL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
100 int mul_opcode() const { return Op_MulL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
101 const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
102 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
103 };
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 //------------------------------MulFNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
107 // Multiply 2 floats
a61af66fc99e Initial load
duke
parents:
diff changeset
108 class MulFNode : public MulNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
109 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
110 MulFNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
111 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
112 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
113 const Type *mul_id() const { return TypeF::ONE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
114 const Type *add_id() const { return TypeF::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
115 int add_opcode() const { return Op_AddF; }
a61af66fc99e Initial load
duke
parents:
diff changeset
116 int mul_opcode() const { return Op_MulF; }
a61af66fc99e Initial load
duke
parents:
diff changeset
117 const Type *bottom_type() const { return Type::FLOAT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
118 virtual uint ideal_reg() const { return Op_RegF; }
a61af66fc99e Initial load
duke
parents:
diff changeset
119 };
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 //------------------------------MulDNode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
122 // Multiply 2 doubles
a61af66fc99e Initial load
duke
parents:
diff changeset
123 class MulDNode : public MulNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
124 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
125 MulDNode( Node *in1, Node *in2 ) : MulNode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
126 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
128 const Type *mul_id() const { return TypeD::ONE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
129 const Type *add_id() const { return TypeD::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
130 int add_opcode() const { return Op_AddD; }
a61af66fc99e Initial load
duke
parents:
diff changeset
131 int mul_opcode() const { return Op_MulD; }
a61af66fc99e Initial load
duke
parents:
diff changeset
132 const Type *bottom_type() const { return Type::DOUBLE; }
a61af66fc99e Initial load
duke
parents:
diff changeset
133 virtual uint ideal_reg() const { return Op_RegD; }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 };
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 //------------------------------AndINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // Logically AND 2 integers. Included with the MUL nodes because it inherits
a61af66fc99e Initial load
duke
parents:
diff changeset
139 // all the behavior of multiplication on a ring.
a61af66fc99e Initial load
duke
parents:
diff changeset
140 class AndINode : public MulINode {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
142 AndINode( Node *in1, Node *in2 ) : MulINode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
143 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
144 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
145 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
146 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
147 const Type *mul_id() const { return TypeInt::MINUS_1; }
a61af66fc99e Initial load
duke
parents:
diff changeset
148 const Type *add_id() const { return TypeInt::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
149 int add_opcode() const { return Op_OrI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
150 int mul_opcode() const { return Op_AndI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
151 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
152 };
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 //------------------------------AndINode---------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
155 // Logically AND 2 longs. Included with the MUL nodes because it inherits
a61af66fc99e Initial load
duke
parents:
diff changeset
156 // all the behavior of multiplication on a ring.
a61af66fc99e Initial load
duke
parents:
diff changeset
157 class AndLNode : public MulLNode {
a61af66fc99e Initial load
duke
parents:
diff changeset
158 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
159 AndLNode( Node *in1, Node *in2 ) : MulLNode(in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
160 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
161 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
162 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
163 virtual const Type *mul_ring( const Type *, const Type * ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
164 const Type *mul_id() const { return TypeLong::MINUS_1; }
a61af66fc99e Initial load
duke
parents:
diff changeset
165 const Type *add_id() const { return TypeLong::ZERO; }
a61af66fc99e Initial load
duke
parents:
diff changeset
166 int add_opcode() const { return Op_OrL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
167 int mul_opcode() const { return Op_AndL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
168 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
169 };
a61af66fc99e Initial load
duke
parents:
diff changeset
170
a61af66fc99e Initial load
duke
parents:
diff changeset
171 //------------------------------LShiftINode------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
172 // Logical shift left
a61af66fc99e Initial load
duke
parents:
diff changeset
173 class LShiftINode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
174 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
175 LShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
176 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
177 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
178 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
179 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
180 const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
181 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
182 };
a61af66fc99e Initial load
duke
parents:
diff changeset
183
a61af66fc99e Initial load
duke
parents:
diff changeset
184 //------------------------------LShiftLNode------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
185 // Logical shift left
a61af66fc99e Initial load
duke
parents:
diff changeset
186 class LShiftLNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
187 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
188 LShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
189 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
190 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
191 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
192 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
193 const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
194 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
195 };
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 //------------------------------RShiftINode------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
198 // Signed shift right
a61af66fc99e Initial load
duke
parents:
diff changeset
199 class RShiftINode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
201 RShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
202 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
203 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
204 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
205 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
206 const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
207 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
208 };
a61af66fc99e Initial load
duke
parents:
diff changeset
209
a61af66fc99e Initial load
duke
parents:
diff changeset
210 //------------------------------RShiftLNode------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
211 // Signed shift right
a61af66fc99e Initial load
duke
parents:
diff changeset
212 class RShiftLNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
213 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
214 RShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
215 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
216 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
217 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
218 const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
219 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
220 };
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 //------------------------------URShiftINode-----------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
224 // Logical shift right
a61af66fc99e Initial load
duke
parents:
diff changeset
225 class URShiftINode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
227 URShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
228 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
229 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
230 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
231 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
232 const Type *bottom_type() const { return TypeInt::INT; }
a61af66fc99e Initial load
duke
parents:
diff changeset
233 virtual uint ideal_reg() const { return Op_RegI; }
a61af66fc99e Initial load
duke
parents:
diff changeset
234 };
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236 //------------------------------URShiftLNode-----------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
237 // Logical shift right
a61af66fc99e Initial load
duke
parents:
diff changeset
238 class URShiftLNode : public Node {
a61af66fc99e Initial load
duke
parents:
diff changeset
239 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
240 URShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
a61af66fc99e Initial load
duke
parents:
diff changeset
241 virtual int Opcode() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
242 virtual Node *Identity( PhaseTransform *phase );
a61af66fc99e Initial load
duke
parents:
diff changeset
243 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
a61af66fc99e Initial load
duke
parents:
diff changeset
244 virtual const Type *Value( PhaseTransform *phase ) const;
a61af66fc99e Initial load
duke
parents:
diff changeset
245 const Type *bottom_type() const { return TypeLong::LONG; }
a61af66fc99e Initial load
duke
parents:
diff changeset
246 virtual uint ideal_reg() const { return Op_RegL; }
a61af66fc99e Initial load
duke
parents:
diff changeset
247 };