< prev index next >

src/hotspot/share/opto/multnode.cpp

Print this page




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/callnode.hpp"
  27 #include "opto/cfgnode.hpp"
  28 #include "opto/matcher.hpp"
  29 #include "opto/mathexactnode.hpp"
  30 #include "opto/multnode.hpp"
  31 #include "opto/opcodes.hpp"
  32 #include "opto/phaseX.hpp"
  33 #include "opto/regmask.hpp"
  34 #include "opto/type.hpp"
  35 #include "utilities/vmError.hpp"
  36 
  37 //=============================================================================
  38 //------------------------------MultiNode--------------------------------------
  39 const RegMask &MultiNode::out_RegMask() const {
  40   return RegMask::Empty;
  41 }
  42 
  43 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
  44 
  45 //------------------------------proj_out---------------------------------------
  46 // Get a named projection or null if not found
  47 ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
  48   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
  49   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2, "bad if #1");
  50   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
  51     Node *p = fast_out(i);
  52     if (p->is_Proj()) {
  53       ProjNode *proj = p->as_Proj();
  54       if (proj->_con == which_proj) {
  55         assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
  56         return proj;
  57       }
  58     } else {
  59       assert(p == this && this->is_Start(), "else must be proj");
  60       continue;
  61     }
  62   }
  63   return NULL;




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/callnode.hpp"
  27 #include "opto/cfgnode.hpp"
  28 #include "opto/matcher.hpp"
  29 #include "opto/mathexactnode.hpp"
  30 #include "opto/multnode.hpp"
  31 #include "opto/opcodes.hpp"
  32 #include "opto/phaseX.hpp"
  33 #include "opto/regmask.hpp"
  34 #include "opto/type.hpp"
  35 #include "utilities/vmError.hpp"
  36 
  37 //=============================================================================
  38 //------------------------------MultiNode--------------------------------------
  39 const RegMask &MultiNode::out_RegMask() const {
  40   return RegMask::Empty;
  41 }
  42 
  43 Node *MultiNode::match(const ProjNode *proj, const Matcher *m, const RegMask* mask) { return proj->clone(); }
  44 
  45 //------------------------------proj_out---------------------------------------
  46 // Get a named projection or null if not found
  47 ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
  48   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
  49   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2, "bad if #1");
  50   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
  51     Node *p = fast_out(i);
  52     if (p->is_Proj()) {
  53       ProjNode *proj = p->as_Proj();
  54       if (proj->_con == which_proj) {
  55         assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
  56         return proj;
  57       }
  58     } else {
  59       assert(p == this && this->is_Start(), "else must be proj");
  60       continue;
  61     }
  62   }
  63   return NULL;


< prev index next >