comparison src/share/vm/adlc/output_h.cpp @ 14434:318d0622a6d7

8028580: PPC64 (part 114/120): Support for Call nodes with constants. Summary: extends MachCall nodes so that they can issue constants to the constant table Reviewed-by: kvn
author goetz
date Wed, 20 Nov 2013 11:08:09 -0800
parents 044b28168e20
children 15120a36272d
comparison
equal deleted inserted replaced
14433:018b357638aa 14434:318d0622a6d7
1612 bool avoid_back_to_back = false; 1612 bool avoid_back_to_back = false;
1613 while (attr != NULL) { 1613 while (attr != NULL) {
1614 if (strcmp (attr->_ident,"ins_cost") && 1614 if (strcmp (attr->_ident,"ins_cost") &&
1615 strncmp(attr->_ident,"ins_field_", 10) != 0 && 1615 strncmp(attr->_ident,"ins_field_", 10) != 0 &&
1616 strcmp (attr->_ident,"ins_short_branch")) { 1616 strcmp (attr->_ident,"ins_short_branch")) {
1617 fprintf(fp," int %s() const { return %s; }\n", 1617 fprintf(fp," virtual int %s() const { return %s; }\n",
1618 attr->_ident, attr->_val); 1618 attr->_ident, attr->_val);
1619 } 1619 }
1620 // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag 1620 // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag
1621 if (!strcmp(attr->_ident,"ins_avoid_back_to_back") && attr->int_val(*this) != 0) 1621 if (!strcmp(attr->_ident,"ins_avoid_back_to_back") && attr->int_val(*this) != 0)
1622 avoid_back_to_back = true; 1622 avoid_back_to_back = true;
1651 // if the ideal_Opcode == Op_Node. 1651 // if the ideal_Opcode == Op_Node.
1652 if ( strcmp("Node", instr->ideal_Opcode(_globalNames)) != 0 || 1652 if ( strcmp("Node", instr->ideal_Opcode(_globalNames)) != 0 ||
1653 strcmp("MachNode", instr->mach_base_class(_globalNames)) != 0 ) { 1653 strcmp("MachNode", instr->mach_base_class(_globalNames)) != 0 ) {
1654 fprintf(fp," virtual int ideal_Opcode() const { return Op_%s; }\n", 1654 fprintf(fp," virtual int ideal_Opcode() const { return Op_%s; }\n",
1655 instr->ideal_Opcode(_globalNames) ); 1655 instr->ideal_Opcode(_globalNames) );
1656 }
1657
1658 if (instr->needs_constant_base() &&
1659 !instr->is_mach_constant()) { // These inherit the funcion from MachConstantNode.
1660 fprintf(fp," virtual uint mach_constant_base_node_input() const { return req()-1; }\n");
1656 } 1661 }
1657 1662
1658 // Allow machine-independent optimization, invert the sense of the IF test 1663 // Allow machine-independent optimization, invert the sense of the IF test
1659 if( instr->is_ideal_if() ) { 1664 if( instr->is_ideal_if() ) {
1660 fprintf(fp," virtual void negate() { \n"); 1665 fprintf(fp," virtual void negate() { \n");
1821 1826
1822 // Virtual methods which are only generated to override base class 1827 // Virtual methods which are only generated to override base class
1823 if( instr->expands() || instr->needs_projections() || 1828 if( instr->expands() || instr->needs_projections() ||
1824 instr->has_temps() || 1829 instr->has_temps() ||
1825 instr->is_mach_constant() || 1830 instr->is_mach_constant() ||
1831 instr->needs_constant_base() ||
1826 instr->_matrule != NULL && 1832 instr->_matrule != NULL &&
1827 instr->num_opnds() != instr->num_unique_opnds() ) { 1833 instr->num_opnds() != instr->num_unique_opnds() ) {
1828 fprintf(fp," virtual MachNode *Expand(State *state, Node_List &proj_list, Node* mem);\n"); 1834 fprintf(fp," virtual MachNode *Expand(State *state, Node_List &proj_list, Node* mem);\n");
1829 } 1835 }
1830 1836