34 class Conv2BNode : public Node { |
34 class Conv2BNode : public Node { |
35 public: |
35 public: |
36 Conv2BNode( Node *i ) : Node(0,i) {} |
36 Conv2BNode( Node *i ) : Node(0,i) {} |
37 virtual int Opcode() const; |
37 virtual int Opcode() const; |
38 virtual const Type *bottom_type() const { return TypeInt::BOOL; } |
38 virtual const Type *bottom_type() const { return TypeInt::BOOL; } |
39 virtual Node *Identity( PhaseTransform *phase ); |
39 virtual Node* Identity(PhaseGVN* phase); |
40 virtual const Type *Value( PhaseTransform *phase ) const; |
40 virtual const Type* Value(PhaseGVN* phase) const; |
41 virtual uint ideal_reg() const { return Op_RegI; } |
41 virtual uint ideal_reg() const { return Op_RegI; } |
42 }; |
42 }; |
43 |
43 |
44 // The conversions operations are all Alpha sorted. Please keep it that way! |
44 // The conversions operations are all Alpha sorted. Please keep it that way! |
45 //------------------------------ConvD2FNode------------------------------------ |
45 //------------------------------ConvD2FNode------------------------------------ |
47 class ConvD2FNode : public Node { |
47 class ConvD2FNode : public Node { |
48 public: |
48 public: |
49 ConvD2FNode( Node *in1 ) : Node(0,in1) {} |
49 ConvD2FNode( Node *in1 ) : Node(0,in1) {} |
50 virtual int Opcode() const; |
50 virtual int Opcode() const; |
51 virtual const Type *bottom_type() const { return Type::FLOAT; } |
51 virtual const Type *bottom_type() const { return Type::FLOAT; } |
52 virtual const Type *Value( PhaseTransform *phase ) const; |
52 virtual const Type* Value(PhaseGVN* phase) const; |
53 virtual Node *Identity( PhaseTransform *phase ); |
53 virtual Node* Identity(PhaseGVN* phase); |
54 virtual uint ideal_reg() const { return Op_RegF; } |
54 virtual uint ideal_reg() const { return Op_RegF; } |
55 }; |
55 }; |
56 |
56 |
57 //------------------------------ConvD2INode------------------------------------ |
57 //------------------------------ConvD2INode------------------------------------ |
58 // Convert Double to Integer |
58 // Convert Double to Integer |
59 class ConvD2INode : public Node { |
59 class ConvD2INode : public Node { |
60 public: |
60 public: |
61 ConvD2INode( Node *in1 ) : Node(0,in1) {} |
61 ConvD2INode( Node *in1 ) : Node(0,in1) {} |
62 virtual int Opcode() const; |
62 virtual int Opcode() const; |
63 virtual const Type *bottom_type() const { return TypeInt::INT; } |
63 virtual const Type *bottom_type() const { return TypeInt::INT; } |
64 virtual const Type *Value( PhaseTransform *phase ) const; |
64 virtual const Type* Value(PhaseGVN* phase) const; |
65 virtual Node *Identity( PhaseTransform *phase ); |
65 virtual Node* Identity(PhaseGVN* phase); |
66 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
66 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
67 virtual uint ideal_reg() const { return Op_RegI; } |
67 virtual uint ideal_reg() const { return Op_RegI; } |
68 }; |
68 }; |
69 |
69 |
70 //------------------------------ConvD2LNode------------------------------------ |
70 //------------------------------ConvD2LNode------------------------------------ |
72 class ConvD2LNode : public Node { |
72 class ConvD2LNode : public Node { |
73 public: |
73 public: |
74 ConvD2LNode( Node *dbl ) : Node(0,dbl) {} |
74 ConvD2LNode( Node *dbl ) : Node(0,dbl) {} |
75 virtual int Opcode() const; |
75 virtual int Opcode() const; |
76 virtual const Type *bottom_type() const { return TypeLong::LONG; } |
76 virtual const Type *bottom_type() const { return TypeLong::LONG; } |
77 virtual const Type *Value( PhaseTransform *phase ) const; |
77 virtual const Type* Value(PhaseGVN* phase) const; |
78 virtual Node *Identity( PhaseTransform *phase ); |
78 virtual Node* Identity(PhaseGVN* phase); |
79 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
79 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
80 virtual uint ideal_reg() const { return Op_RegL; } |
80 virtual uint ideal_reg() const { return Op_RegL; } |
81 }; |
81 }; |
82 |
82 |
83 //------------------------------ConvF2DNode------------------------------------ |
83 //------------------------------ConvF2DNode------------------------------------ |
85 class ConvF2DNode : public Node { |
85 class ConvF2DNode : public Node { |
86 public: |
86 public: |
87 ConvF2DNode( Node *in1 ) : Node(0,in1) {} |
87 ConvF2DNode( Node *in1 ) : Node(0,in1) {} |
88 virtual int Opcode() const; |
88 virtual int Opcode() const; |
89 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
89 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
90 virtual const Type *Value( PhaseTransform *phase ) const; |
90 virtual const Type* Value(PhaseGVN* phase) const; |
91 virtual uint ideal_reg() const { return Op_RegD; } |
91 virtual uint ideal_reg() const { return Op_RegD; } |
92 }; |
92 }; |
93 |
93 |
94 //------------------------------ConvF2INode------------------------------------ |
94 //------------------------------ConvF2INode------------------------------------ |
95 // Convert float to integer |
95 // Convert float to integer |
96 class ConvF2INode : public Node { |
96 class ConvF2INode : public Node { |
97 public: |
97 public: |
98 ConvF2INode( Node *in1 ) : Node(0,in1) {} |
98 ConvF2INode( Node *in1 ) : Node(0,in1) {} |
99 virtual int Opcode() const; |
99 virtual int Opcode() const; |
100 virtual const Type *bottom_type() const { return TypeInt::INT; } |
100 virtual const Type *bottom_type() const { return TypeInt::INT; } |
101 virtual const Type *Value( PhaseTransform *phase ) const; |
101 virtual const Type* Value(PhaseGVN* phase) const; |
102 virtual Node *Identity( PhaseTransform *phase ); |
102 virtual Node* Identity(PhaseGVN* phase); |
103 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
103 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
104 virtual uint ideal_reg() const { return Op_RegI; } |
104 virtual uint ideal_reg() const { return Op_RegI; } |
105 }; |
105 }; |
106 |
106 |
107 //------------------------------ConvF2LNode------------------------------------ |
107 //------------------------------ConvF2LNode------------------------------------ |
109 class ConvF2LNode : public Node { |
109 class ConvF2LNode : public Node { |
110 public: |
110 public: |
111 ConvF2LNode( Node *in1 ) : Node(0,in1) {} |
111 ConvF2LNode( Node *in1 ) : Node(0,in1) {} |
112 virtual int Opcode() const; |
112 virtual int Opcode() const; |
113 virtual const Type *bottom_type() const { return TypeLong::LONG; } |
113 virtual const Type *bottom_type() const { return TypeLong::LONG; } |
114 virtual const Type *Value( PhaseTransform *phase ) const; |
114 virtual const Type* Value(PhaseGVN* phase) const; |
115 virtual Node *Identity( PhaseTransform *phase ); |
115 virtual Node* Identity(PhaseGVN* phase); |
116 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
116 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
117 virtual uint ideal_reg() const { return Op_RegL; } |
117 virtual uint ideal_reg() const { return Op_RegL; } |
118 }; |
118 }; |
119 |
119 |
120 //------------------------------ConvI2DNode------------------------------------ |
120 //------------------------------ConvI2DNode------------------------------------ |
122 class ConvI2DNode : public Node { |
122 class ConvI2DNode : public Node { |
123 public: |
123 public: |
124 ConvI2DNode( Node *in1 ) : Node(0,in1) {} |
124 ConvI2DNode( Node *in1 ) : Node(0,in1) {} |
125 virtual int Opcode() const; |
125 virtual int Opcode() const; |
126 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
126 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
127 virtual const Type *Value( PhaseTransform *phase ) const; |
127 virtual const Type* Value(PhaseGVN* phase) const; |
128 virtual uint ideal_reg() const { return Op_RegD; } |
128 virtual uint ideal_reg() const { return Op_RegD; } |
129 }; |
129 }; |
130 |
130 |
131 //------------------------------ConvI2FNode------------------------------------ |
131 //------------------------------ConvI2FNode------------------------------------ |
132 // Convert Integer to Float |
132 // Convert Integer to Float |
133 class ConvI2FNode : public Node { |
133 class ConvI2FNode : public Node { |
134 public: |
134 public: |
135 ConvI2FNode( Node *in1 ) : Node(0,in1) {} |
135 ConvI2FNode( Node *in1 ) : Node(0,in1) {} |
136 virtual int Opcode() const; |
136 virtual int Opcode() const; |
137 virtual const Type *bottom_type() const { return Type::FLOAT; } |
137 virtual const Type *bottom_type() const { return Type::FLOAT; } |
138 virtual const Type *Value( PhaseTransform *phase ) const; |
138 virtual const Type* Value(PhaseGVN* phase) const; |
139 virtual Node *Identity( PhaseTransform *phase ); |
139 virtual Node* Identity(PhaseGVN* phase); |
140 virtual uint ideal_reg() const { return Op_RegF; } |
140 virtual uint ideal_reg() const { return Op_RegF; } |
141 }; |
141 }; |
142 |
142 |
143 //------------------------------ConvI2LNode------------------------------------ |
143 //------------------------------ConvI2LNode------------------------------------ |
144 // Convert integer to long |
144 // Convert integer to long |
146 public: |
146 public: |
147 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT) |
147 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT) |
148 : TypeNode(t, 2) |
148 : TypeNode(t, 2) |
149 { init_req(1, in1); } |
149 { init_req(1, in1); } |
150 virtual int Opcode() const; |
150 virtual int Opcode() const; |
151 virtual const Type *Value( PhaseTransform *phase ) const; |
151 virtual const Type* Value(PhaseGVN* phase) const; |
152 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
152 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
153 virtual uint ideal_reg() const { return Op_RegL; } |
153 virtual uint ideal_reg() const { return Op_RegL; } |
154 }; |
154 }; |
155 |
155 |
156 //------------------------------ConvL2DNode------------------------------------ |
156 //------------------------------ConvL2DNode------------------------------------ |
158 class ConvL2DNode : public Node { |
158 class ConvL2DNode : public Node { |
159 public: |
159 public: |
160 ConvL2DNode( Node *in1 ) : Node(0,in1) {} |
160 ConvL2DNode( Node *in1 ) : Node(0,in1) {} |
161 virtual int Opcode() const; |
161 virtual int Opcode() const; |
162 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
162 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
163 virtual const Type *Value( PhaseTransform *phase ) const; |
163 virtual const Type* Value(PhaseGVN* phase) const; |
164 virtual uint ideal_reg() const { return Op_RegD; } |
164 virtual uint ideal_reg() const { return Op_RegD; } |
165 }; |
165 }; |
166 |
166 |
167 //------------------------------ConvL2FNode------------------------------------ |
167 //------------------------------ConvL2FNode------------------------------------ |
168 // Convert Long to Float |
168 // Convert Long to Float |
169 class ConvL2FNode : public Node { |
169 class ConvL2FNode : public Node { |
170 public: |
170 public: |
171 ConvL2FNode( Node *in1 ) : Node(0,in1) {} |
171 ConvL2FNode( Node *in1 ) : Node(0,in1) {} |
172 virtual int Opcode() const; |
172 virtual int Opcode() const; |
173 virtual const Type *bottom_type() const { return Type::FLOAT; } |
173 virtual const Type *bottom_type() const { return Type::FLOAT; } |
174 virtual const Type *Value( PhaseTransform *phase ) const; |
174 virtual const Type* Value(PhaseGVN* phase) const; |
175 virtual uint ideal_reg() const { return Op_RegF; } |
175 virtual uint ideal_reg() const { return Op_RegF; } |
176 }; |
176 }; |
177 |
177 |
178 //------------------------------ConvL2INode------------------------------------ |
178 //------------------------------ConvL2INode------------------------------------ |
179 // Convert long to integer |
179 // Convert long to integer |
180 class ConvL2INode : public Node { |
180 class ConvL2INode : public Node { |
181 public: |
181 public: |
182 ConvL2INode( Node *in1 ) : Node(0,in1) {} |
182 ConvL2INode( Node *in1 ) : Node(0,in1) {} |
183 virtual int Opcode() const; |
183 virtual int Opcode() const; |
184 virtual const Type *bottom_type() const { return TypeInt::INT; } |
184 virtual const Type *bottom_type() const { return TypeInt::INT; } |
185 virtual Node *Identity( PhaseTransform *phase ); |
185 virtual Node* Identity(PhaseGVN* phase); |
186 virtual const Type *Value( PhaseTransform *phase ) const; |
186 virtual const Type* Value(PhaseGVN* phase) const; |
187 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
187 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
188 virtual uint ideal_reg() const { return Op_RegI; } |
188 virtual uint ideal_reg() const { return Op_RegI; } |
189 }; |
189 }; |
190 |
190 |
191 //-----------------------------RoundFloatNode---------------------------------- |
191 //-----------------------------RoundFloatNode---------------------------------- |
193 public: |
193 public: |
194 RoundFloatNode(Node* c, Node *in1): Node(c, in1) {} |
194 RoundFloatNode(Node* c, Node *in1): Node(c, in1) {} |
195 virtual int Opcode() const; |
195 virtual int Opcode() const; |
196 virtual const Type *bottom_type() const { return Type::FLOAT; } |
196 virtual const Type *bottom_type() const { return Type::FLOAT; } |
197 virtual uint ideal_reg() const { return Op_RegF; } |
197 virtual uint ideal_reg() const { return Op_RegF; } |
198 virtual Node *Identity( PhaseTransform *phase ); |
198 virtual Node* Identity(PhaseGVN* phase); |
199 virtual const Type *Value( PhaseTransform *phase ) const; |
199 virtual const Type* Value(PhaseGVN* phase) const; |
200 }; |
200 }; |
201 |
201 |
202 |
202 |
203 //-----------------------------RoundDoubleNode--------------------------------- |
203 //-----------------------------RoundDoubleNode--------------------------------- |
204 class RoundDoubleNode: public Node { |
204 class RoundDoubleNode: public Node { |
205 public: |
205 public: |
206 RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {} |
206 RoundDoubleNode(Node* c, Node *in1): Node(c, in1) {} |
207 virtual int Opcode() const; |
207 virtual int Opcode() const; |
208 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
208 virtual const Type *bottom_type() const { return Type::DOUBLE; } |
209 virtual uint ideal_reg() const { return Op_RegD; } |
209 virtual uint ideal_reg() const { return Op_RegD; } |
210 virtual Node *Identity( PhaseTransform *phase ); |
210 virtual Node* Identity(PhaseGVN* phase); |
211 virtual const Type *Value( PhaseTransform *phase ) const; |
211 virtual const Type* Value(PhaseGVN* phase) const; |
212 }; |
212 }; |
213 |
213 |
214 |
214 |
215 #endif // SHARE_VM_OPTO_CONVERTNODE_HPP |
215 #endif // SHARE_VM_OPTO_CONVERTNODE_HPP |