comparison src/share/vm/adlc/formssel.cpp @ 602:ed6404fac86b

6810855: KILL vs. TEMP ordering restrictions are too strong Reviewed-by: kvn
author never
date Thu, 26 Feb 2009 16:57:21 -0800
parents 0ad1cb407fa1
children dbbe28fc66b5
comparison
equal deleted inserted replaced
601:523ded093c31 602:ed6404fac86b
856 if (kill_name != NULL && 856 if (kill_name != NULL &&
857 e->isa(Component::TEMP) && !e->isa(Component::DEF)) { 857 e->isa(Component::TEMP) && !e->isa(Component::DEF)) {
858 OperandForm* kill = (OperandForm*)_localNames[kill_name]; 858 OperandForm* kill = (OperandForm*)_localNames[kill_name];
859 globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n", 859 globalAD->syntax_err(_linenum, "%s: %s %s must be at the end of the argument list\n",
860 _ident, kill->_ident, kill_name); 860 _ident, kill->_ident, kill_name);
861 } else if (e->isa(Component::KILL)) { 861 } else if (e->isa(Component::KILL) && !e->isa(Component::USE)) {
862 kill_name = name;
863 }
864
865 // TEMPs are real uses and need to be among the first parameters
866 // listed, otherwise the numbering of operands and inputs gets
867 // screwy, so enforce this restriction during parse.
868 if (kill_name != NULL &&
869 e->isa(Component::TEMP) && !e->isa(Component::DEF)) {
870 OperandForm* kill = (OperandForm*)_localNames[kill_name];
871 globalAD->syntax_err(_linenum, "%s: %s %s must follow %s %s in the argument list\n",
872 _ident, kill->_ident, kill_name, opForm->_ident, name);
873 } else if (e->isa(Component::KILL)) {
874 kill_name = name; 862 kill_name = name;
875 } 863 }
876 } 864 }
877 865
878 const Component *component = _components.search(name); 866 const Component *component = _components.search(name);