< prev index next >

src/hotspot/share/adlc/formssel.cpp

Print this page

 791        !strcmp(_matrule->_rChild->_opType,"RotateLeft")   ||
 792        !strcmp(_matrule->_rChild->_opType,"RotateRight")   ||
 793 #if INCLUDE_SHENANDOAHGC
 794        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeP") ||
 795        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeN") ||
 796 #endif
 797        !strcmp(_matrule->_rChild->_opType,"StrInflatedCopy") ||
 798        !strcmp(_matrule->_rChild->_opType,"VectorCmpMasked")||
 799        !strcmp(_matrule->_rChild->_opType,"VectorMaskGen")||
 800        !strcmp(_matrule->_rChild->_opType,"VerifyVectorAlignment")||
 801        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeP") ||
 802        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
 803   else if ( is_ideal_load() == Form::idealP )                return true;
 804   else if ( is_ideal_store() != Form::none  )                return true;
 805 
 806   if (needs_base_oop_edge(globals)) return true;
 807 
 808   if (is_vector()) return true;
 809   if (is_mach_constant()) return true;
 810 
 811   return  false;
 812 }
 813 
 814 
 815 // Access instr_cost attribute or return null.
 816 const char* InstructForm::cost() {
 817   for (Attribute* cur = _attribs; cur != nullptr; cur = (Attribute*)cur->_next) {
 818     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 819       return cur->_val;
 820     }
 821   }
 822   return nullptr;
 823 }
 824 
 825 // Return count of top-level operands.
 826 uint InstructForm::num_opnds() {
 827   int  num_opnds = _components.num_operands();
 828 
 829   // Need special handling for matching some ideal nodes
 830   // i.e. Matching a return node
 831   /*

 882 const char *InstructForm::out_reg_class(FormDict &globals) {
 883   assert( false, "InstructForm::out_reg_class(FormDict &globals); Not Implemented");
 884 
 885   return nullptr;
 886 }
 887 
 888 
 889 
 890 // Lookup the starting position of inputs we are interested in wrt. ideal nodes
 891 uint InstructForm::oper_input_base(FormDict &globals) {
 892   if( !_matrule ) return 1;     // Skip control for most nodes
 893 
 894   // Need special handling for matching some ideal nodes
 895   // i.e. Matching a return node
 896   if( strcmp(_matrule->_opType,"Return"    )==0 ||
 897       strcmp(_matrule->_opType,"Rethrow"   )==0 ||
 898       strcmp(_matrule->_opType,"TailCall"  )==0 ||
 899       strcmp(_matrule->_opType,"TailJump"  )==0 ||
 900       strcmp(_matrule->_opType,"ForwardException")==0 ||
 901       strcmp(_matrule->_opType,"SafePoint" )==0 ||
 902       strcmp(_matrule->_opType,"Halt"      )==0 )

 903     return AdlcVMDeps::Parms;   // Skip the machine-state edges
 904 
 905   if( _matrule->_rChild &&
 906       ( strcmp(_matrule->_rChild->_opType,"AryEq"     )==0 ||
 907         strcmp(_matrule->_rChild->_opType,"VectorizedHashCode")==0 ||
 908         strcmp(_matrule->_rChild->_opType,"StrComp"   )==0 ||
 909         strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
 910         strcmp(_matrule->_rChild->_opType,"StrInflatedCopy"   )==0 ||
 911         strcmp(_matrule->_rChild->_opType,"StrCompressedCopy" )==0 ||
 912         strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 ||
 913         strcmp(_matrule->_rChild->_opType,"StrIndexOfChar")==0 ||
 914         strcmp(_matrule->_rChild->_opType,"CountPositives")==0 ||
 915         strcmp(_matrule->_rChild->_opType,"EncodeISOArray")==0)) {
 916         // String.(compareTo/equals/indexOf/hashCode) and Arrays.equals
 917         // and sun.nio.cs.iso8859_1$Encoder.EncodeISOArray
 918         // take 1 control and 1 memory edges.
 919         // Also String.(compressedCopy/inflatedCopy).
 920     return 2;
 921   }
 922 

 791        !strcmp(_matrule->_rChild->_opType,"RotateLeft")   ||
 792        !strcmp(_matrule->_rChild->_opType,"RotateRight")   ||
 793 #if INCLUDE_SHENANDOAHGC
 794        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeP") ||
 795        !strcmp(_matrule->_rChild->_opType,"ShenandoahCompareAndExchangeN") ||
 796 #endif
 797        !strcmp(_matrule->_rChild->_opType,"StrInflatedCopy") ||
 798        !strcmp(_matrule->_rChild->_opType,"VectorCmpMasked")||
 799        !strcmp(_matrule->_rChild->_opType,"VectorMaskGen")||
 800        !strcmp(_matrule->_rChild->_opType,"VerifyVectorAlignment")||
 801        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeP") ||
 802        !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
 803   else if ( is_ideal_load() == Form::idealP )                return true;
 804   else if ( is_ideal_store() != Form::none  )                return true;
 805 
 806   if (needs_base_oop_edge(globals)) return true;
 807 
 808   if (is_vector()) return true;
 809   if (is_mach_constant()) return true;
 810 
 811   return false;
 812 }
 813 
 814 
 815 // Access instr_cost attribute or return null.
 816 const char* InstructForm::cost() {
 817   for (Attribute* cur = _attribs; cur != nullptr; cur = (Attribute*)cur->_next) {
 818     if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
 819       return cur->_val;
 820     }
 821   }
 822   return nullptr;
 823 }
 824 
 825 // Return count of top-level operands.
 826 uint InstructForm::num_opnds() {
 827   int  num_opnds = _components.num_operands();
 828 
 829   // Need special handling for matching some ideal nodes
 830   // i.e. Matching a return node
 831   /*

 882 const char *InstructForm::out_reg_class(FormDict &globals) {
 883   assert( false, "InstructForm::out_reg_class(FormDict &globals); Not Implemented");
 884 
 885   return nullptr;
 886 }
 887 
 888 
 889 
 890 // Lookup the starting position of inputs we are interested in wrt. ideal nodes
 891 uint InstructForm::oper_input_base(FormDict &globals) {
 892   if( !_matrule ) return 1;     // Skip control for most nodes
 893 
 894   // Need special handling for matching some ideal nodes
 895   // i.e. Matching a return node
 896   if( strcmp(_matrule->_opType,"Return"    )==0 ||
 897       strcmp(_matrule->_opType,"Rethrow"   )==0 ||
 898       strcmp(_matrule->_opType,"TailCall"  )==0 ||
 899       strcmp(_matrule->_opType,"TailJump"  )==0 ||
 900       strcmp(_matrule->_opType,"ForwardException")==0 ||
 901       strcmp(_matrule->_opType,"SafePoint" )==0 ||
 902       strcmp(_matrule->_opType,"Halt"      )==0 ||
 903       strcmp(_matrule->_opType,"CallLeafNoFP")==0)
 904     return AdlcVMDeps::Parms;   // Skip the machine-state edges
 905 
 906   if( _matrule->_rChild &&
 907       ( strcmp(_matrule->_rChild->_opType,"AryEq"     )==0 ||
 908         strcmp(_matrule->_rChild->_opType,"VectorizedHashCode")==0 ||
 909         strcmp(_matrule->_rChild->_opType,"StrComp"   )==0 ||
 910         strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
 911         strcmp(_matrule->_rChild->_opType,"StrInflatedCopy"   )==0 ||
 912         strcmp(_matrule->_rChild->_opType,"StrCompressedCopy" )==0 ||
 913         strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 ||
 914         strcmp(_matrule->_rChild->_opType,"StrIndexOfChar")==0 ||
 915         strcmp(_matrule->_rChild->_opType,"CountPositives")==0 ||
 916         strcmp(_matrule->_rChild->_opType,"EncodeISOArray")==0)) {
 917         // String.(compareTo/equals/indexOf/hashCode) and Arrays.equals
 918         // and sun.nio.cs.iso8859_1$Encoder.EncodeISOArray
 919         // take 1 control and 1 memory edges.
 920         // Also String.(compressedCopy/inflatedCopy).
 921     return 2;
 922   }
 923 
< prev index next >