811 return NULL; 812 } 813 814 815 816 // Lookup the starting position of inputs we are interested in wrt. ideal nodes 817 uint InstructForm::oper_input_base(FormDict &globals) { 818 if( !_matrule ) return 1; // Skip control for most nodes 819 820 // Need special handling for matching some ideal nodes 821 // i.e. Matching a return node 822 if( strcmp(_matrule->_opType,"Return" )==0 || 823 strcmp(_matrule->_opType,"Rethrow" )==0 || 824 strcmp(_matrule->_opType,"TailCall" )==0 || 825 strcmp(_matrule->_opType,"TailJump" )==0 || 826 strcmp(_matrule->_opType,"SafePoint" )==0 || 827 strcmp(_matrule->_opType,"Halt" )==0 ) 828 return AdlcVMDeps::Parms; // Skip the machine-state edges 829 830 if( _matrule->_rChild && 831 ( strcmp(_matrule->_rChild->_opType,"StrComp" )==0 || 832 strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 || 833 strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 )) { 834 // String.(compareTo/equals/indexOf) take 1 control and 4 memory edges. 835 return 5; 836 } 837 838 // Check for handling of 'Memory' input/edge in the ideal world. 839 // The AD file writer is shielded from knowledge of these edges. 840 int base = 1; // Skip control 841 base += _matrule->needs_ideal_memory_edge(globals); 842 843 // Also skip the base-oop value for uses of derived oops. 844 // The AD file writer is shielded from knowledge of these edges. 845 base += needs_base_oop_edge(globals); 846 847 return base; 848 } 849 850 // Implementation does not modify state of internal structures 851 void InstructForm::build_components() { 852 // Add top-level operands to the components 853 if (_matrule) _matrule->append_components(_localNames, _components); 854 855 // Add parameters that "do not appear in match rule". | 811 return NULL; 812 } 813 814 815 816 // Lookup the starting position of inputs we are interested in wrt. ideal nodes 817 uint InstructForm::oper_input_base(FormDict &globals) { 818 if( !_matrule ) return 1; // Skip control for most nodes 819 820 // Need special handling for matching some ideal nodes 821 // i.e. Matching a return node 822 if( strcmp(_matrule->_opType,"Return" )==0 || 823 strcmp(_matrule->_opType,"Rethrow" )==0 || 824 strcmp(_matrule->_opType,"TailCall" )==0 || 825 strcmp(_matrule->_opType,"TailJump" )==0 || 826 strcmp(_matrule->_opType,"SafePoint" )==0 || 827 strcmp(_matrule->_opType,"Halt" )==0 ) 828 return AdlcVMDeps::Parms; // Skip the machine-state edges 829 830 if( _matrule->_rChild && 831 ( strcmp(_matrule->_rChild->_opType,"AryEq" )==0 || 832 strcmp(_matrule->_rChild->_opType,"StrComp" )==0 || 833 strcmp(_matrule->_rChild->_opType,"StrEquals" )==0 || 834 strcmp(_matrule->_rChild->_opType,"StrIndexOf")==0 )) { 835 // String.(compareTo/equals/indexOf) and Arrays.equals 836 // take 1 control and 1 memory edges. 837 return 2; 838 } 839 840 // Check for handling of 'Memory' input/edge in the ideal world. 841 // The AD file writer is shielded from knowledge of these edges. 842 int base = 1; // Skip control 843 base += _matrule->needs_ideal_memory_edge(globals); 844 845 // Also skip the base-oop value for uses of derived oops. 846 // The AD file writer is shielded from knowledge of these edges. 847 base += needs_base_oop_edge(globals); 848 849 return base; 850 } 851 852 // Implementation does not modify state of internal structures 853 void InstructForm::build_components() { 854 // Add top-level operands to the components 855 if (_matrule) _matrule->append_components(_localNames, _components); 856 857 // Add parameters that "do not appear in match rule". |