src/hotspot/share/opto/callnode.cpp
changeset 54327 a4d19817609c
parent 53509 28aa41c4165b
child 58061 fafba5cf3546
child 58678 9cf78a70fa4f
equal deleted inserted replaced
54326:eb7f2c367f73 54327:a4d19817609c
    47 
    47 
    48 // Optimization - Graph Style
    48 // Optimization - Graph Style
    49 
    49 
    50 //=============================================================================
    50 //=============================================================================
    51 uint StartNode::size_of() const { return sizeof(*this); }
    51 uint StartNode::size_of() const { return sizeof(*this); }
    52 uint StartNode::cmp( const Node &n ) const
    52 bool StartNode::cmp( const Node &n ) const
    53 { return _domain == ((StartNode&)n)._domain; }
    53 { return _domain == ((StartNode&)n)._domain; }
    54 const Type *StartNode::bottom_type() const { return _domain; }
    54 const Type *StartNode::bottom_type() const { return _domain; }
    55 const Type* StartNode::Value(PhaseGVN* phase) const { return _domain; }
    55 const Type* StartNode::Value(PhaseGVN* phase) const { return _domain; }
    56 #ifndef PRODUCT
    56 #ifndef PRODUCT
    57 void StartNode::dump_spec(outputStream *st) const { st->print(" #"); _domain->dump_on(st);}
    57 void StartNode::dump_spec(outputStream *st) const { st->print(" #"); _domain->dump_on(st);}
   664   }
   664   }
   665   return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord;
   665   return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord;
   666 }
   666 }
   667 
   667 
   668 //=============================================================================
   668 //=============================================================================
   669 uint CallNode::cmp( const Node &n ) const
   669 bool CallNode::cmp( const Node &n ) const
   670 { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; }
   670 { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; }
   671 #ifndef PRODUCT
   671 #ifndef PRODUCT
   672 void CallNode::dump_req(outputStream *st) const {
   672 void CallNode::dump_req(outputStream *st) const {
   673   // Dump the required inputs, enclosed in '(' and ')'
   673   // Dump the required inputs, enclosed in '(' and ')'
   674   uint i;                       // Exit value of loop
   674   uint i;                       // Exit value of loop
   960   return false;
   960   return false;
   961 }
   961 }
   962 
   962 
   963 //=============================================================================
   963 //=============================================================================
   964 uint CallJavaNode::size_of() const { return sizeof(*this); }
   964 uint CallJavaNode::size_of() const { return sizeof(*this); }
   965 uint CallJavaNode::cmp( const Node &n ) const {
   965 bool CallJavaNode::cmp( const Node &n ) const {
   966   CallJavaNode &call = (CallJavaNode&)n;
   966   CallJavaNode &call = (CallJavaNode&)n;
   967   return CallNode::cmp(call) && _method == call._method &&
   967   return CallNode::cmp(call) && _method == call._method &&
   968          _override_symbolic_info == call._override_symbolic_info;
   968          _override_symbolic_info == call._override_symbolic_info;
   969 }
   969 }
   970 #ifdef ASSERT
   970 #ifdef ASSERT
   997 }
   997 }
   998 #endif
   998 #endif
   999 
   999 
  1000 //=============================================================================
  1000 //=============================================================================
  1001 uint CallStaticJavaNode::size_of() const { return sizeof(*this); }
  1001 uint CallStaticJavaNode::size_of() const { return sizeof(*this); }
  1002 uint CallStaticJavaNode::cmp( const Node &n ) const {
  1002 bool CallStaticJavaNode::cmp( const Node &n ) const {
  1003   CallStaticJavaNode &call = (CallStaticJavaNode&)n;
  1003   CallStaticJavaNode &call = (CallStaticJavaNode&)n;
  1004   return CallJavaNode::cmp(call);
  1004   return CallJavaNode::cmp(call);
  1005 }
  1005 }
  1006 
  1006 
  1007 //----------------------------uncommon_trap_request----------------------------
  1007 //----------------------------uncommon_trap_request----------------------------
  1054 }
  1054 }
  1055 #endif
  1055 #endif
  1056 
  1056 
  1057 //=============================================================================
  1057 //=============================================================================
  1058 uint CallDynamicJavaNode::size_of() const { return sizeof(*this); }
  1058 uint CallDynamicJavaNode::size_of() const { return sizeof(*this); }
  1059 uint CallDynamicJavaNode::cmp( const Node &n ) const {
  1059 bool CallDynamicJavaNode::cmp( const Node &n ) const {
  1060   CallDynamicJavaNode &call = (CallDynamicJavaNode&)n;
  1060   CallDynamicJavaNode &call = (CallDynamicJavaNode&)n;
  1061   return CallJavaNode::cmp(call);
  1061   return CallJavaNode::cmp(call);
  1062 }
  1062 }
  1063 #ifndef PRODUCT
  1063 #ifndef PRODUCT
  1064 void CallDynamicJavaNode::dump_spec(outputStream *st) const {
  1064 void CallDynamicJavaNode::dump_spec(outputStream *st) const {
  1067 }
  1067 }
  1068 #endif
  1068 #endif
  1069 
  1069 
  1070 //=============================================================================
  1070 //=============================================================================
  1071 uint CallRuntimeNode::size_of() const { return sizeof(*this); }
  1071 uint CallRuntimeNode::size_of() const { return sizeof(*this); }
  1072 uint CallRuntimeNode::cmp( const Node &n ) const {
  1072 bool CallRuntimeNode::cmp( const Node &n ) const {
  1073   CallRuntimeNode &call = (CallRuntimeNode&)n;
  1073   CallRuntimeNode &call = (CallRuntimeNode&)n;
  1074   return CallNode::cmp(call) && !strcmp(_name,call._name);
  1074   return CallNode::cmp(call) && !strcmp(_name,call._name);
  1075 }
  1075 }
  1076 #ifndef PRODUCT
  1076 #ifndef PRODUCT
  1077 void CallRuntimeNode::dump_spec(outputStream *st) const {
  1077 void CallRuntimeNode::dump_spec(outputStream *st) const {
  1116   }
  1116   }
  1117   set_req(loc, c);
  1117   set_req(loc, c);
  1118 }
  1118 }
  1119 
  1119 
  1120 uint SafePointNode::size_of() const { return sizeof(*this); }
  1120 uint SafePointNode::size_of() const { return sizeof(*this); }
  1121 uint SafePointNode::cmp( const Node &n ) const {
  1121 bool SafePointNode::cmp( const Node &n ) const {
  1122   return (&n == this);          // Always fail except on self
  1122   return (&n == this);          // Always fail except on self
  1123 }
  1123 }
  1124 
  1124 
  1125 //-------------------------set_next_exception----------------------------------
  1125 //-------------------------set_next_exception----------------------------------
  1126 void SafePointNode::set_next_exception(SafePointNode* n) {
  1126 void SafePointNode::set_next_exception(SafePointNode* n) {
  1312   init_class_id(Class_SafePointScalarObject);
  1312   init_class_id(Class_SafePointScalarObject);
  1313 }
  1313 }
  1314 
  1314 
  1315 // Do not allow value-numbering for SafePointScalarObject node.
  1315 // Do not allow value-numbering for SafePointScalarObject node.
  1316 uint SafePointScalarObjectNode::hash() const { return NO_HASH; }
  1316 uint SafePointScalarObjectNode::hash() const { return NO_HASH; }
  1317 uint SafePointScalarObjectNode::cmp( const Node &n ) const {
  1317 bool SafePointScalarObjectNode::cmp( const Node &n ) const {
  1318   return (&n == this); // Always fail except on self
  1318   return (&n == this); // Always fail except on self
  1319 }
  1319 }
  1320 
  1320 
  1321 uint SafePointScalarObjectNode::ideal_reg() const {
  1321 uint SafePointScalarObjectNode::ideal_reg() const {
  1322   return 0; // No matching to machine instruction
  1322   return 0; // No matching to machine instruction
  2082     return dest_alias == t_oop_alias;
  2082     return dest_alias == t_oop_alias;
  2083   }
  2083   }
  2084 
  2084 
  2085   return true;
  2085   return true;
  2086 }
  2086 }
  2087