< prev index next >

src/hotspot/share/adlc/formssel.cpp

Print this page

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

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

 895     return AdlcVMDeps::Parms;   // Skip the machine-state edges
 896 
 897   if( _matrule->_rChild &&
 898       ( strcmp(_matrule->_rChild->_opType,"AryEq"     )==0 ||
 899         strcmp(_matrule->_rChild->_opType,"StrComp"   )==0 ||
 900         strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
 901         strcmp(_matrule->_rChild->_opType,"StrInflatedCopy"   )==0 ||
 902         strcmp(_matrule->_rChild->_opType,"StrCompressedCopy" )==0 ||
 903         strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 ||
 904         strcmp(_matrule->_rChild->_opType,"StrIndexOfChar")==0 ||
 905         strcmp(_matrule->_rChild->_opType,"HasNegatives")==0 ||
 906         strcmp(_matrule->_rChild->_opType,"EncodeISOArray")==0)) {
 907         // String.(compareTo/equals/indexOf) and Arrays.equals
 908         // and sun.nio.cs.iso8859_1$Encoder.EncodeISOArray
 909         // take 1 control and 1 memory edges.
 910         // Also String.(compressedCopy/inflatedCopy).
 911     return 2;
 912   }
 913 
 914   // Check for handling of 'Memory' input/edge in the ideal world.

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

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