comparison src/share/vm/adlc/output_h.cpp @ 1544:1a88d3c58e1d

Merge
author jrose
date Thu, 20 May 2010 01:34:22 -0700
parents b5fdf39b9749
children c18cbe5936b8
comparison
equal deleted inserted replaced
1536:892898e961c5 1544:1a88d3c58e1d
1491 if ( instr->ideal_only() ) continue; 1491 if ( instr->ideal_only() ) continue;
1492 1492
1493 // Build class definition for this instruction 1493 // Build class definition for this instruction
1494 fprintf(fp,"\n"); 1494 fprintf(fp,"\n");
1495 fprintf(fp,"class %sNode : public %s { \n", 1495 fprintf(fp,"class %sNode : public %s { \n",
1496 instr->_ident, instr->mach_base_class() ); 1496 instr->_ident, instr->mach_base_class(_globalNames) );
1497 fprintf(fp,"private:\n"); 1497 fprintf(fp,"private:\n");
1498 fprintf(fp," MachOper *_opnd_array[%d];\n", instr->num_opnds() ); 1498 fprintf(fp," MachOper *_opnd_array[%d];\n", instr->num_opnds() );
1499 if ( instr->is_ideal_jump() ) { 1499 if ( instr->is_ideal_jump() ) {
1500 fprintf(fp, " GrowableArray<Label*> _index2label;\n"); 1500 fprintf(fp, " GrowableArray<Label*> _index2label;\n");
1501 } 1501 }
1564 1564
1565 // Return the top-level ideal opcode. 1565 // Return the top-level ideal opcode.
1566 // Use MachNode::ideal_Opcode() for nodes based on MachNode class 1566 // Use MachNode::ideal_Opcode() for nodes based on MachNode class
1567 // if the ideal_Opcode == Op_Node. 1567 // if the ideal_Opcode == Op_Node.
1568 if ( strcmp("Node", instr->ideal_Opcode(_globalNames)) != 0 || 1568 if ( strcmp("Node", instr->ideal_Opcode(_globalNames)) != 0 ||
1569 strcmp("MachNode", instr->mach_base_class()) != 0 ) { 1569 strcmp("MachNode", instr->mach_base_class(_globalNames)) != 0 ) {
1570 fprintf(fp," virtual int ideal_Opcode() const { return Op_%s; }\n", 1570 fprintf(fp," virtual int ideal_Opcode() const { return Op_%s; }\n",
1571 instr->ideal_Opcode(_globalNames) ); 1571 instr->ideal_Opcode(_globalNames) );
1572 } 1572 }
1573 1573
1574 // Allow machine-independent optimization, invert the sense of the IF test 1574 // Allow machine-independent optimization, invert the sense of the IF test
1629 1629
1630 // Starting point for inputs matcher wants. 1630 // Starting point for inputs matcher wants.
1631 // Use MachNode::oper_input_base() for nodes based on MachNode class 1631 // Use MachNode::oper_input_base() for nodes based on MachNode class
1632 // if the base == 1. 1632 // if the base == 1.
1633 if ( instr->oper_input_base(_globalNames) != 1 || 1633 if ( instr->oper_input_base(_globalNames) != 1 ||
1634 strcmp("MachNode", instr->mach_base_class()) != 0 ) { 1634 strcmp("MachNode", instr->mach_base_class(_globalNames)) != 0 ) {
1635 fprintf(fp," virtual uint oper_input_base() const { return %d; }\n", 1635 fprintf(fp," virtual uint oper_input_base() const { return %d; }\n",
1636 instr->oper_input_base(_globalNames)); 1636 instr->oper_input_base(_globalNames));
1637 } 1637 }
1638 1638
1639 // Make the constructor and following methods 'public:' 1639 // Make the constructor and following methods 'public:'
1903 offset = 2; 1903 offset = 2;
1904 } 1904 }
1905 // Special hack for ideal CMoveN; ideal type depends on inputs 1905 // Special hack for ideal CMoveN; ideal type depends on inputs
1906 fprintf(fp," const Type *bottom_type() const { const Type *t = in(oper_input_base()+%d)->bottom_type(); return (req() <= oper_input_base()+%d) ? t : t->meet(in(oper_input_base()+%d)->bottom_type()); } // CMoveN\n", 1906 fprintf(fp," const Type *bottom_type() const { const Type *t = in(oper_input_base()+%d)->bottom_type(); return (req() <= oper_input_base()+%d) ? t : t->meet(in(oper_input_base()+%d)->bottom_type()); } // CMoveN\n",
1907 offset, offset+1, offset+1); 1907 offset, offset+1, offset+1);
1908 }
1909 else if( instr->needs_base_oop_edge(_globalNames) ) {
1910 // Special hack for ideal AddP. Bottom type is an oop IFF it has a
1911 // legal base-pointer input. Otherwise it is NOT an oop.
1912 fprintf(fp," const Type *bottom_type() const { return AddPNode::mach_bottom_type(this); } // AddP\n");
1913 } 1908 }
1914 else if (instr->is_tls_instruction()) { 1909 else if (instr->is_tls_instruction()) {
1915 // Special hack for tlsLoadP 1910 // Special hack for tlsLoadP
1916 fprintf(fp," const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } // tlsLoadP\n"); 1911 fprintf(fp," const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } // tlsLoadP\n");
1917 } 1912 }