Mercurial > hg > graal-jvmci-8
comparison src/share/vm/adlc/formssel.cpp @ 1541:b5fdf39b9749
6953576: bottom_type for matched AddPNodes doesn't always agree with ideal
Reviewed-by: kvn
author | never |
---|---|
date | Tue, 18 May 2010 23:58:32 -0700 |
parents | d7f654633cfe |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1540:99791ad65936 | 1541:b5fdf39b9749 |
---|---|
733 } | 733 } |
734 | 734 |
735 | 735 |
736 // This instruction captures the machine-independent bottom_type | 736 // This instruction captures the machine-independent bottom_type |
737 // Expected use is for pointer vs oop determination for LoadP | 737 // Expected use is for pointer vs oop determination for LoadP |
738 bool InstructForm::captures_bottom_type() const { | 738 bool InstructForm::captures_bottom_type(FormDict &globals) const { |
739 if( _matrule && _matrule->_rChild && | 739 if( _matrule && _matrule->_rChild && |
740 (!strcmp(_matrule->_rChild->_opType,"CastPP") || // new result type | 740 (!strcmp(_matrule->_rChild->_opType,"CastPP") || // new result type |
741 !strcmp(_matrule->_rChild->_opType,"CastX2P") || // new result type | 741 !strcmp(_matrule->_rChild->_opType,"CastX2P") || // new result type |
742 !strcmp(_matrule->_rChild->_opType,"DecodeN") || | 742 !strcmp(_matrule->_rChild->_opType,"DecodeN") || |
743 !strcmp(_matrule->_rChild->_opType,"EncodeP") || | 743 !strcmp(_matrule->_rChild->_opType,"EncodeP") || |
745 !strcmp(_matrule->_rChild->_opType,"LoadNKlass") || | 745 !strcmp(_matrule->_rChild->_opType,"LoadNKlass") || |
746 !strcmp(_matrule->_rChild->_opType,"CreateEx") || // type of exception | 746 !strcmp(_matrule->_rChild->_opType,"CreateEx") || // type of exception |
747 !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true; | 747 !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true; |
748 else if ( is_ideal_load() == Form::idealP ) return true; | 748 else if ( is_ideal_load() == Form::idealP ) return true; |
749 else if ( is_ideal_store() != Form::none ) return true; | 749 else if ( is_ideal_store() != Form::none ) return true; |
750 | |
751 if (needs_base_oop_edge(globals)) return true; | |
750 | 752 |
751 return false; | 753 return false; |
752 } | 754 } |
753 | 755 |
754 | 756 |
1059 return _matrule->reduce_left(globals); | 1061 return _matrule->reduce_left(globals); |
1060 } | 1062 } |
1061 | 1063 |
1062 | 1064 |
1063 // Base class for this instruction, MachNode except for calls | 1065 // Base class for this instruction, MachNode except for calls |
1064 const char *InstructForm::mach_base_class() const { | 1066 const char *InstructForm::mach_base_class(FormDict &globals) const { |
1065 if( is_ideal_call() == Form::JAVA_STATIC ) { | 1067 if( is_ideal_call() == Form::JAVA_STATIC ) { |
1066 return "MachCallStaticJavaNode"; | 1068 return "MachCallStaticJavaNode"; |
1067 } | 1069 } |
1068 else if( is_ideal_call() == Form::JAVA_DYNAMIC ) { | 1070 else if( is_ideal_call() == Form::JAVA_DYNAMIC ) { |
1069 return "MachCallDynamicJavaNode"; | 1071 return "MachCallDynamicJavaNode"; |
1090 return "MachFastLockNode"; | 1092 return "MachFastLockNode"; |
1091 } | 1093 } |
1092 else if (is_ideal_nop()) { | 1094 else if (is_ideal_nop()) { |
1093 return "MachNopNode"; | 1095 return "MachNopNode"; |
1094 } | 1096 } |
1095 else if (captures_bottom_type()) { | 1097 else if (captures_bottom_type(globals)) { |
1096 return "MachTypeNode"; | 1098 return "MachTypeNode"; |
1097 } else { | 1099 } else { |
1098 return "MachNode"; | 1100 return "MachNode"; |
1099 } | 1101 } |
1100 assert( false, "ShouldNotReachHere()"); | 1102 assert( false, "ShouldNotReachHere()"); |