196 };
197 virtual int Opcode() const;
198 virtual Node* Identity(PhaseGVN* phase) { return this; }
199 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return nullptr; }
200 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
201 virtual uint hash() const { return Node::hash(); }
202 virtual bool is_CFG() const { return false; }
203 virtual uint ideal_reg() const { return NotAMachineReg; }
204
205 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
206 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
207 };
208
209 //------------------------------DivModINode---------------------------------------
210 // Integer division with remainder result.
211 class DivModINode : public DivModNode {
212 public:
213 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
214 virtual int Opcode() const;
215 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
216 virtual Node *match( const ProjNode *proj, const Matcher *m );
217
218 // Make a divmod and associated projections from a div or mod.
219 static DivModINode* make(Node* div_or_mod);
220 };
221
222 //------------------------------DivModLNode---------------------------------------
223 // Long division with remainder result.
224 class DivModLNode : public DivModNode {
225 public:
226 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
227 virtual int Opcode() const;
228 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
229 virtual Node *match( const ProjNode *proj, const Matcher *m );
230
231 // Make a divmod and associated projections from a div or mod.
232 static DivModLNode* make(Node* div_or_mod);
233 };
234
235
236 //------------------------------UDivModINode---------------------------------------
237 // Unsigend integer division with remainder result.
238 class UDivModINode : public DivModNode {
239 public:
240 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
241 virtual int Opcode() const;
242 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
243 virtual Node *match( const ProjNode *proj, const Matcher *m );
244
245 // Make a divmod and associated projections from a div or mod.
246 static UDivModINode* make(Node* div_or_mod);
247 };
248
249 //------------------------------UDivModLNode---------------------------------------
250 // Unsigned long division with remainder result.
251 class UDivModLNode : public DivModNode {
252 public:
253 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
254 virtual int Opcode() const;
255 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
256 virtual Node *match( const ProjNode *proj, const Matcher *m );
257
258 // Make a divmod and associated projections from a div or mod.
259 static UDivModLNode* make(Node* div_or_mod);
260 };
261
262 #endif // SHARE_OPTO_DIVNODE_HPP
|
196 };
197 virtual int Opcode() const;
198 virtual Node* Identity(PhaseGVN* phase) { return this; }
199 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return nullptr; }
200 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
201 virtual uint hash() const { return Node::hash(); }
202 virtual bool is_CFG() const { return false; }
203 virtual uint ideal_reg() const { return NotAMachineReg; }
204
205 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
206 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
207 };
208
209 //------------------------------DivModINode---------------------------------------
210 // Integer division with remainder result.
211 class DivModINode : public DivModNode {
212 public:
213 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
214 virtual int Opcode() const;
215 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
216 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
217
218 // Make a divmod and associated projections from a div or mod.
219 static DivModINode* make(Node* div_or_mod);
220 };
221
222 //------------------------------DivModLNode---------------------------------------
223 // Long division with remainder result.
224 class DivModLNode : public DivModNode {
225 public:
226 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
227 virtual int Opcode() const;
228 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
229 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
230
231 // Make a divmod and associated projections from a div or mod.
232 static DivModLNode* make(Node* div_or_mod);
233 };
234
235
236 //------------------------------UDivModINode---------------------------------------
237 // Unsigend integer division with remainder result.
238 class UDivModINode : public DivModNode {
239 public:
240 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
241 virtual int Opcode() const;
242 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
243 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
244
245 // Make a divmod and associated projections from a div or mod.
246 static UDivModINode* make(Node* div_or_mod);
247 };
248
249 //------------------------------UDivModLNode---------------------------------------
250 // Unsigned long division with remainder result.
251 class UDivModLNode : public DivModNode {
252 public:
253 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
254 virtual int Opcode() const;
255 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
256 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
257
258 // Make a divmod and associated projections from a div or mod.
259 static UDivModLNode* make(Node* div_or_mod);
260 };
261
262 #endif // SHARE_OPTO_DIVNODE_HPP
|