< prev index next >

src/hotspot/share/adlc/formssel.cpp

Print this page

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

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

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

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

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