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 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
206
207 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
208 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
209 };
210
211 //------------------------------DivModINode---------------------------------------
212 // Integer division with remainder result.
213 class DivModINode : public DivModNode {
214 public:
215 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
216 virtual int Opcode() const;
217 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
218 virtual Node *match( const ProjNode *proj, const Matcher *m );
219
220 // Make a divmod and associated projections from a div or mod.
221 static DivModINode* make(Node* div_or_mod);
222 };
223
224 //------------------------------DivModLNode---------------------------------------
225 // Long division with remainder result.
226 class DivModLNode : public DivModNode {
227 public:
228 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
229 virtual int Opcode() const;
230 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
231 virtual Node *match( const ProjNode *proj, const Matcher *m );
232
233 // Make a divmod and associated projections from a div or mod.
234 static DivModLNode* make(Node* div_or_mod);
235 };
236
237
238 //------------------------------UDivModINode---------------------------------------
239 // Unsigend integer division with remainder result.
240 class UDivModINode : public DivModNode {
241 public:
242 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
243 virtual int Opcode() const;
244 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
245 virtual Node *match( const ProjNode *proj, const Matcher *m );
246
247 // Make a divmod and associated projections from a div or mod.
248 static UDivModINode* make(Node* div_or_mod);
249 };
250
251 //------------------------------UDivModLNode---------------------------------------
252 // Unsigned long division with remainder result.
253 class UDivModLNode : public DivModNode {
254 public:
255 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
256 virtual int Opcode() const;
257 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
258 virtual Node *match( const ProjNode *proj, const Matcher *m );
259
260 // Make a divmod and associated projections from a div or mod.
261 static UDivModLNode* make(Node* div_or_mod);
262 };
263
264 #endif // SHARE_OPTO_DIVNODE_HPP
|
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 static DivModNode* make(Node* div_or_mod, BasicType bt, bool is_unsigned);
206
207 ProjNode* div_proj() { return proj_out_or_null(div_proj_num); }
208 ProjNode* mod_proj() { return proj_out_or_null(mod_proj_num); }
209 };
210
211 //------------------------------DivModINode---------------------------------------
212 // Integer division with remainder result.
213 class DivModINode : public DivModNode {
214 public:
215 DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
216 virtual int Opcode() const;
217 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
218 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
219
220 // Make a divmod and associated projections from a div or mod.
221 static DivModINode* make(Node* div_or_mod);
222 };
223
224 //------------------------------DivModLNode---------------------------------------
225 // Long division with remainder result.
226 class DivModLNode : public DivModNode {
227 public:
228 DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
229 virtual int Opcode() const;
230 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
231 virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask);
232
233 // Make a divmod and associated projections from a div or mod.
234 static DivModLNode* make(Node* div_or_mod);
235 };
236
237
238 //------------------------------UDivModINode---------------------------------------
239 // Unsigend integer division with remainder result.
240 class UDivModINode : public DivModNode {
241 public:
242 UDivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
243 virtual int Opcode() const;
244 virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
245 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
246
247 // Make a divmod and associated projections from a div or mod.
248 static UDivModINode* make(Node* div_or_mod);
249 };
250
251 //------------------------------UDivModLNode---------------------------------------
252 // Unsigned long division with remainder result.
253 class UDivModLNode : public DivModNode {
254 public:
255 UDivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
256 virtual int Opcode() const;
257 virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
258 virtual Node* match(const ProjNode* proj, const Matcher* m, const RegMask* mask);
259
260 // Make a divmod and associated projections from a div or mod.
261 static UDivModLNode* make(Node* div_or_mod);
262 };
263
264 #endif // SHARE_OPTO_DIVNODE_HPP
|