src/share/vm/opto/divnode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8054033 Sdiff src/share/vm/opto

src/share/vm/opto/divnode.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 151   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; }
 152   virtual const Type *Value( PhaseTransform *phase ) const { return bottom_type(); }
 153   virtual uint hash() const { return Node::hash(); }
 154   virtual bool is_CFG() const  { return false; }
 155   virtual uint ideal_reg() const { return NotAMachineReg; }
 156 
 157   ProjNode* div_proj() { return proj_out(div_proj_num); }
 158   ProjNode* mod_proj() { return proj_out(mod_proj_num); }
 159 };
 160 
 161 //------------------------------DivModINode---------------------------------------
 162 // Integer division with remainder result.
 163 class DivModINode : public DivModNode {
 164 public:
 165   DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
 166   virtual int Opcode() const;
 167   virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
 168   virtual Node *match( const ProjNode *proj, const Matcher *m );
 169 
 170   // Make a divmod and associated projections from a div or mod.
 171   static DivModINode* make(Compile* C, Node* div_or_mod);
 172 };
 173 
 174 //------------------------------DivModLNode---------------------------------------
 175 // Long division with remainder result.
 176 class DivModLNode : public DivModNode {
 177 public:
 178   DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
 179   virtual int Opcode() const;
 180   virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
 181   virtual Node *match( const ProjNode *proj, const Matcher *m );
 182 
 183   // Make a divmod and associated projections from a div or mod.
 184   static DivModLNode* make(Compile* C, Node* div_or_mod);
 185 };
 186 
 187 #endif // SHARE_VM_OPTO_DIVNODE_HPP
   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 151   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; }
 152   virtual const Type *Value( PhaseTransform *phase ) const { return bottom_type(); }
 153   virtual uint hash() const { return Node::hash(); }
 154   virtual bool is_CFG() const  { return false; }
 155   virtual uint ideal_reg() const { return NotAMachineReg; }
 156 
 157   ProjNode* div_proj() { return proj_out(div_proj_num); }
 158   ProjNode* mod_proj() { return proj_out(mod_proj_num); }
 159 };
 160 
 161 //------------------------------DivModINode---------------------------------------
 162 // Integer division with remainder result.
 163 class DivModINode : public DivModNode {
 164 public:
 165   DivModINode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
 166   virtual int Opcode() const;
 167   virtual const Type *bottom_type() const { return TypeTuple::INT_PAIR; }
 168   virtual Node *match( const ProjNode *proj, const Matcher *m );
 169 
 170   // Make a divmod and associated projections from a div or mod.
 171   static DivModINode* make(Node* div_or_mod);
 172 };
 173 
 174 //------------------------------DivModLNode---------------------------------------
 175 // Long division with remainder result.
 176 class DivModLNode : public DivModNode {
 177 public:
 178   DivModLNode( Node *c, Node *dividend, Node *divisor ) : DivModNode(c, dividend, divisor) {}
 179   virtual int Opcode() const;
 180   virtual const Type *bottom_type() const { return TypeTuple::LONG_PAIR; }
 181   virtual Node *match( const ProjNode *proj, const Matcher *m );
 182 
 183   // Make a divmod and associated projections from a div or mod.
 184   static DivModLNode* make(Node* div_or_mod);
 185 };
 186 
 187 #endif // SHARE_VM_OPTO_DIVNODE_HPP
src/share/vm/opto/divnode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File