787 !strcmp(_matrule->_rChild->_opType,"GetAndSetN") ||
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,"CompareAndExchangeP") ||
798 !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
799 else if ( is_ideal_load() == Form::idealP ) return true;
800 else if ( is_ideal_store() != Form::none ) return true;
801
802 if (needs_base_oop_edge(globals)) return true;
803
804 if (is_vector()) return true;
805 if (is_mach_constant()) return true;
806
807 return false;
808 }
809
810
811 // Access instr_cost attribute or return null.
812 const char* InstructForm::cost() {
813 for (Attribute* cur = _attribs; cur != nullptr; cur = (Attribute*)cur->_next) {
814 if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
815 return cur->_val;
816 }
817 }
818 return nullptr;
819 }
820
821 // Return count of top-level operands.
822 uint InstructForm::num_opnds() {
823 int num_opnds = _components.num_operands();
824
825 // Need special handling for matching some ideal nodes
826 // i.e. Matching a return node
827 /*
877 // Return the register class associated with 'leaf'.
878 const char *InstructForm::out_reg_class(FormDict &globals) {
879 assert( false, "InstructForm::out_reg_class(FormDict &globals); Not Implemented");
880
881 return nullptr;
882 }
883
884
885
886 // Lookup the starting position of inputs we are interested in wrt. ideal nodes
887 uint InstructForm::oper_input_base(FormDict &globals) {
888 if( !_matrule ) return 1; // Skip control for most nodes
889
890 // Need special handling for matching some ideal nodes
891 // i.e. Matching a return node
892 if( strcmp(_matrule->_opType,"Return" )==0 ||
893 strcmp(_matrule->_opType,"Rethrow" )==0 ||
894 strcmp(_matrule->_opType,"TailCall" )==0 ||
895 strcmp(_matrule->_opType,"TailJump" )==0 ||
896 strcmp(_matrule->_opType,"SafePoint" )==0 ||
897 strcmp(_matrule->_opType,"Halt" )==0 )
898 return AdlcVMDeps::Parms; // Skip the machine-state edges
899
900 if( _matrule->_rChild &&
901 ( strcmp(_matrule->_rChild->_opType,"AryEq" )==0 ||
902 strcmp(_matrule->_rChild->_opType,"VectorizedHashCode")==0 ||
903 strcmp(_matrule->_rChild->_opType,"StrComp" )==0 ||
904 strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 ||
905 strcmp(_matrule->_rChild->_opType,"StrInflatedCopy" )==0 ||
906 strcmp(_matrule->_rChild->_opType,"StrCompressedCopy" )==0 ||
907 strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 ||
908 strcmp(_matrule->_rChild->_opType,"StrIndexOfChar")==0 ||
909 strcmp(_matrule->_rChild->_opType,"CountPositives")==0 ||
910 strcmp(_matrule->_rChild->_opType,"EncodeISOArray")==0)) {
911 // String.(compareTo/equals/indexOf/hashCode) and Arrays.equals
912 // and sun.nio.cs.iso8859_1$Encoder.EncodeISOArray
913 // take 1 control and 1 memory edges.
914 // Also String.(compressedCopy/inflatedCopy).
915 return 2;
916 }
917
|
787 !strcmp(_matrule->_rChild->_opType,"GetAndSetN") ||
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,"CompareAndExchangeP") ||
798 !strcmp(_matrule->_rChild->_opType,"CompareAndExchangeN"))) return true;
799 else if ( is_ideal_load() == Form::idealP ) return true;
800 else if ( is_ideal_store() != Form::none ) return true;
801
802 if (needs_base_oop_edge(globals)) return true;
803
804 if (is_vector()) return true;
805 if (is_mach_constant()) return true;
806
807 return false;
808 }
809
810
811 // Access instr_cost attribute or return null.
812 const char* InstructForm::cost() {
813 for (Attribute* cur = _attribs; cur != nullptr; cur = (Attribute*)cur->_next) {
814 if( strcmp(cur->_ident,AttributeForm::_ins_cost) == 0 ) {
815 return cur->_val;
816 }
817 }
818 return nullptr;
819 }
820
821 // Return count of top-level operands.
822 uint InstructForm::num_opnds() {
823 int num_opnds = _components.num_operands();
824
825 // Need special handling for matching some ideal nodes
826 // i.e. Matching a return node
827 /*
877 // Return the register class associated with 'leaf'.
878 const char *InstructForm::out_reg_class(FormDict &globals) {
879 assert( false, "InstructForm::out_reg_class(FormDict &globals); Not Implemented");
880
881 return nullptr;
882 }
883
884
885
886 // Lookup the starting position of inputs we are interested in wrt. ideal nodes
887 uint InstructForm::oper_input_base(FormDict &globals) {
888 if( !_matrule ) return 1; // Skip control for most nodes
889
890 // Need special handling for matching some ideal nodes
891 // i.e. Matching a return node
892 if( strcmp(_matrule->_opType,"Return" )==0 ||
893 strcmp(_matrule->_opType,"Rethrow" )==0 ||
894 strcmp(_matrule->_opType,"TailCall" )==0 ||
895 strcmp(_matrule->_opType,"TailJump" )==0 ||
896 strcmp(_matrule->_opType,"SafePoint" )==0 ||
897 strcmp(_matrule->_opType,"Halt" )==0 ||
898 strcmp(_matrule->_opType,"CallLeafNoFP")==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
|