< prev index next >

src/hotspot/share/opto/multnode.cpp

Print this page

 22  *
 23  */
 24 
 25 #include "opto/callnode.hpp"
 26 #include "opto/cfgnode.hpp"
 27 #include "opto/matcher.hpp"
 28 #include "opto/mathexactnode.hpp"
 29 #include "opto/multnode.hpp"
 30 #include "opto/opcodes.hpp"
 31 #include "opto/phaseX.hpp"
 32 #include "opto/regmask.hpp"
 33 #include "opto/type.hpp"
 34 #include "utilities/vmError.hpp"
 35 
 36 //=============================================================================
 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 or null if not found
 46 ProjNode* MultiNode::proj_out_or_null(uint which_proj) const {
 47   assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || which_proj == (uint)true || which_proj == (uint)false, "must be 1 or 0");
 48   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
 49     Node *p = fast_out(i);
 50     if (p->is_Proj()) {
 51       ProjNode *proj = p->as_Proj();
 52       if (proj->_con == which_proj) {
 53         assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || proj->Opcode() == (which_proj ? Op_IfTrue : Op_IfFalse), "bad if #2");
 54         return proj;
 55       }
 56     } else {
 57       assert(p == this && this->is_Start(), "else must be proj");
 58       continue;
 59     }
 60   }
 61   return nullptr;
 62 }

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