235 virtual Node* Identity(PhaseGVN* phase) { return this; }
236 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return nullptr; }
237 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
238 virtual uint hash() const { return Node::hash(); }
239 virtual bool is_CFG() const { return false; }
240 virtual uint ideal_reg() const { return NotAMachineReg; }
241
242 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
243
244 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
245 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
246 };
247
248 //------------------------------DivModINode---------------------------------------
249 // Integer division with remainder result.
250 class DivModINode : public DivModNode {
251 public:
252 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
253 virtual int Opcode() const;
254 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
255 virtual Node *match( const ProjNode *proj, const Matcher *m );
256
257 // Make a divmod and associated projections from a div or mod.
258 static DivModINode* make(Node* div_or_mod);
259 };
260
261 //------------------------------DivModLNode---------------------------------------
262 // Long division with remainder result.
263 class DivModLNode : public DivModNode {
264 public:
265 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
266 virtual int Opcode() const;
267 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
268 virtual Node *match( const ProjNode *proj, const Matcher *m );
269
270 // Make a divmod and associated projections from a div or mod.
271 static DivModLNode* make(Node* div_or_mod);
272 };
273
274
275 //------------------------------UDivModINode---------------------------------------
276 // Unsigend integer division with remainder result.
277 class UDivModINode : public DivModNode {
278 public:
279 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
280 virtual int Opcode() const;
281 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
282 virtual Node *match( const ProjNode *proj, const Matcher *m );
283
284 // Make a divmod and associated projections from a div or mod.
285 static UDivModINode* make(Node* div_or_mod);
286 };
287
288 //------------------------------UDivModLNode---------------------------------------
289 // Unsigned long division with remainder result.
290 class UDivModLNode : public DivModNode {
291 public:
292 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
293 virtual int Opcode() const;
294 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
295 virtual Node *match( const ProjNode *proj, const Matcher *m );
296
297 // Make a divmod and associated projections from a div or mod.
298 static UDivModLNode* make(Node* div_or_mod);
299 };
300
301 #endif // SHARE_OPTO_DIVNODE_HPP
|
235 virtual Node* Identity(PhaseGVN* phase) { return this; }
236 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return nullptr; }
237 virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
238 virtual uint hash() const { return Node::hash(); }
239 virtual bool is_CFG() const { return false; }
240 virtual uint ideal_reg() const { return NotAMachineReg; }
241
242 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
243
244 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
245 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
246 };
247
248 //------------------------------DivModINode---------------------------------------
249 // Integer division with remainder result.
250 class DivModINode : public DivModNode {
251 public:
252 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
253 virtual int Opcode() const;
254 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
255 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
256
257 // Make a divmod and associated projections from a div or mod.
258 static DivModINode* make(Node* div_or_mod);
259 };
260
261 //------------------------------DivModLNode---------------------------------------
262 // Long division with remainder result.
263 class DivModLNode : public DivModNode {
264 public:
265 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
266 virtual int Opcode() const;
267 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
268 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
269
270 // Make a divmod and associated projections from a div or mod.
271 static DivModLNode* make(Node* div_or_mod);
272 };
273
274
275 //------------------------------UDivModINode---------------------------------------
276 // Unsigend integer division with remainder result.
277 class UDivModINode : public DivModNode {
278 public:
279 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
280 virtual int Opcode() const;
281 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
282 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
283
284 // Make a divmod and associated projections from a div or mod.
285 static UDivModINode* make(Node* div_or_mod);
286 };
287
288 //------------------------------UDivModLNode---------------------------------------
289 // Unsigned long division with remainder result.
290 class UDivModLNode : public DivModNode {
291 public:
292 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
293 virtual int Opcode() const;
294 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
295 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
296
297 // Make a divmod and associated projections from a div or mod.
298 static UDivModLNode* make(Node* div_or_mod);
299 };
300
301 #endif // SHARE_OPTO_DIVNODE_HPP
|