src/share/vm/opto/multnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/multnode.cpp

Print this page
rev 5902 : 8027754: Enable loop optimizations for loops with MathExact inside


  37 //------------------------------MultiNode--------------------------------------
  38 const RegMask &MultiNode::out_RegMask() const {
  39   return RegMask::Empty;
  40 }
  41 
  42 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
  43 
  44 //------------------------------proj_out---------------------------------------
  45 // Get a named projection
  46 ProjNode* MultiNode::proj_out(uint which_proj) const {
  47   assert(Opcode() != Op_If || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
  48   assert(Opcode() != Op_If || outcnt() == 2, "bad if #1");
  49   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
  50     Node *p = fast_out(i);
  51     if (p->is_Proj()) {
  52       ProjNode *proj = p->as_Proj();
  53       if (proj->_con == which_proj) {
  54         assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2");
  55         return proj;
  56       }
  57     } else if (p->is_FlagsProj()) {
  58       FlagsProjNode *proj = p->as_FlagsProj();
  59       if (proj->_con == which_proj) {
  60         return proj;
  61       }
  62     } else {
  63       assert(p == this && this->is_Start(), "else must be proj");
  64       continue;
  65     }
  66   }
  67   return NULL;
  68 }
  69 
  70 //=============================================================================
  71 //------------------------------ProjNode---------------------------------------
  72 uint ProjNode::hash() const {
  73   // only one input
  74   return (uintptr_t)in(TypeFunc::Control) + (_con << 1) + (_is_io_use ? 1 : 0);
  75 }
  76 uint ProjNode::cmp( const Node &n ) const { return _con == ((ProjNode&)n)._con && ((ProjNode&)n)._is_io_use == _is_io_use; }
  77 uint ProjNode::size_of() const { return sizeof(ProjNode); }
  78 
  79 // Test if we propagate interesting control along this projection
  80 bool ProjNode::is_CFG() const {
  81   Node *def = in(0);




  37 //------------------------------MultiNode--------------------------------------
  38 const RegMask &MultiNode::out_RegMask() const {
  39   return RegMask::Empty;
  40 }
  41 
  42 Node *MultiNode::match( const ProjNode *proj, const Matcher *m ) { return proj->clone(); }
  43 
  44 //------------------------------proj_out---------------------------------------
  45 // Get a named projection
  46 ProjNode* MultiNode::proj_out(uint which_proj) const {
  47   assert(Opcode() != Op_If || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
  48   assert(Opcode() != Op_If || outcnt() == 2, "bad if #1");
  49   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
  50     Node *p = fast_out(i);
  51     if (p->is_Proj()) {
  52       ProjNode *proj = p->as_Proj();
  53       if (proj->_con == which_proj) {
  54         assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2");
  55         return proj;
  56       }





  57     } else {
  58       assert(p == this && this->is_Start(), "else must be proj");
  59       continue;
  60     }
  61   }
  62   return NULL;
  63 }
  64 
  65 //=============================================================================
  66 //------------------------------ProjNode---------------------------------------
  67 uint ProjNode::hash() const {
  68   // only one input
  69   return (uintptr_t)in(TypeFunc::Control) + (_con << 1) + (_is_io_use ? 1 : 0);
  70 }
  71 uint ProjNode::cmp( const Node &n ) const { return _con == ((ProjNode&)n)._con && ((ProjNode&)n)._is_io_use == _is_io_use; }
  72 uint ProjNode::size_of() const { return sizeof(ProjNode); }
  73 
  74 // Test if we propagate interesting control along this projection
  75 bool ProjNode::is_CFG() const {
  76   Node *def = in(0);


src/share/vm/opto/multnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File