Lines Matching refs:node
973 fprintf(fp_cpp, " // if either node does not have pipeline info, use default\n");
1062 static void defineOut_RegMask(FILE *fp, const char *node, const char *regMask) {
1064 node, regMask);
1367 // Add control edge for this node
1414 // Define the Peephole method for an instruction node
1415 void ArchDesc::definePeephole(FILE *fp, InstructForm *node) {
1417 fprintf(fp, "MachNode *%sNode::peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ) {\n", node->_ident);
1429 for( peep = node->peepholes(); peep != NULL; peep = peep->next() ) {
1446 for( peep = node->peepholes(); peep != NULL; peep = peep->next() ) {
1453 assert( true, // %%name?%% strcmp( node->_ident, pmatch->name(0) ) == 0,
1484 // Define the Expand method for an instruction node
1485 void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
1490 fprintf(fp, "MachNode* %sNode::Expand(State* state, Node_List& proj_list, Node* mem) {\n", node->_ident);
1493 if( node->expands() ) {
1500 unsigned numo = node->num_opnds() +
1501 node->_exprule->_newopers.count();
1504 if (node->_exprule->_newopers.count()) {
1505 for(node->_exprule->_newopers.reset();
1506 (new_id = node->_exprule->_newopers.iter()) != NULL; cnt++) {
1507 frm = node->_localNames[new_id];
1510 char *tmp = (char *)node->_exprule->_newopconst[new_id];
1524 if (i < node->num_opnds()) {
1533 for( i = 1; i < node->num_opnds(); i++ ) {
1540 // The order in which the memory input is added to a node is very
1545 int has_memory_edge = node->_matrule->needs_ideal_memory_edge(_globalNames);
1552 for( i = 0; i < node->num_opnds(); i++ ) {
1560 // Iterate over the instructions 'node' expands into
1561 ExpandRule *expand = node->_exprule;
1569 globalAD->syntax_err(node->_linenum, "In %s: expand rules using instructs with TEMPs aren't supported: %s",
1570 node->_ident, new_id);
1573 // Build the node for the instruction
1575 // Add control edge for this node
1577 // Build the operand for the value this node defines.
1583 if( node->is_ideal_if() && new_inst->is_ideal_if() ) {
1588 if( node->is_ideal_fastlock() && new_inst->is_ideal_fastlock() ) {
1593 if (node->captures_bottom_type(_globalNames) &&
1609 int node_mem_op = node->memory_operand(_globalNames);
1627 if ((exp_pos = node->_exprule->_newopers.index(opid)) != -1) {
1629 exp_pos += node->num_opnds();
1634 cnt, new_pos, exp_pos-node->num_opnds(), opid);
1643 exp_pos = node->operand_position_format(opid);
1653 syntax_err(node->_linenum, "For expand in %s to work, parameter declaration order in %s must follow matchrule\n",
1654 node->_ident, new_inst->_ident);
1660 // Copy the operand from the ExpandNode to the new node
1699 if( ! node->expands() && (node->needs_projections() || node->has_temps())) {
1706 node->_components.reset();
1714 while( (comp = node->_components.iter()) != NULL ) {
1732 // this mach node construction, see buildMachNode().
1734 // int idx = node->operand_position_format(comp->_name);
1754 syntax_err(node->_linenum, "In %s only bound registers can be killed: %s %s\n",
1755 node->_ident, comp->_type, comp->_name);
1766 if( !node->expands() && node->_matrule != NULL ) {
1769 uint cur_num_opnds = node->num_opnds();
1770 if( cur_num_opnds > 1 && cur_num_opnds != node->num_unique_opnds() ) {
1776 fprintf(fp, " \t// %s\n", node->opnd_ident(i));
1786 node->_components.reset();
1789 comp = node->_components.iter();
1790 if( (int)i != node->unique_opnds_idx(i) ) {
1797 comp = node->_components.iter();
1798 int j = node->unique_opnds_idx(i);
1800 if( j != node->unique_opnds_idx(j) ) {
1817 assert(new_num_opnds == node->num_unique_opnds(), "what?");
1821 // If the node is a MachConstantNode, insert the MachConstantBaseNode edge.
1823 if (node->is_mach_constant()) {
1828 if( node->expands() ) {
1839 // Special classes and routines for defining node emit routines which output
2843 fprintf(fp,"(PhaseRegAlloc *ra_, const Node *node, int idx) const { \n");
2846 fprintf(fp,"(PhaseRegAlloc *ra_, const Node *node, int idx) const { \n");
2870 fprintf(fp," return (int)ra_->get_encode(node->in(idx");
2874 // StackSlot for an sReg comes either from input node or from self, when idx==0
2877 fprintf(fp," return ra_->reg2offset(ra_->get_reg_first(node->in(idx)));/* sReg */\n");
2880 fprintf(fp," return ra_->reg2offset(ra_->get_reg_first(node));/* sReg */\n");
2925 // Construct the method to copy _idx, inputs and operands to new node.
2928 fprintf(fp_cpp, "// Copy _idx, inputs and operands to new node\n");
2929 fprintf(fp_cpp, "void MachNode::fill_new_machnode( MachNode* node, Compile* C) const {\n");
2935 // New node must use same node index for access through allocator's tables
2936 fprintf(fp_cpp, " // New node must use same node index\n");
2937 fprintf(fp_cpp, " node->set_idx( _idx );\n");
2941 fprintf(fp_cpp, " node->add_req(in(j));\n");
2946 fprintf(fp_cpp, " assert( node->num_opnds() == (uint)nopnds, \"Must have same number of operands\");\n");
2947 fprintf(fp_cpp, " MachOper **to = node->_opnds;\n");
3206 // Output the definitions for machine node specific pipeline data
3630 // Base Case: access constant in ideal node linked to current state node
3764 fprintf(fp_cpp, "%s %sNode *node = new (C) %sNode();\n",indent, opClass,opClass);
3790 fprintf(fp_cpp, "%s node->set_opnd_array(%d, ", indent, index);
3796 // In this case, we need to subsume the constant into the node
3800 fprintf(fp_cpp, "%s node->_opnd_array[%d] = ", indent,
3825 fprintf(fp_cpp, "%s node->_bottom_type = _leaf->bottom_type();\n", indent);
3828 fprintf(fp_cpp, "%s node->_prob = _leaf->as_If()->_prob;\n", indent);
3829 fprintf(fp_cpp, "%s node->_fcnt = _leaf->as_If()->_fcnt;\n", indent);
3832 fprintf(fp_cpp, "%s node->_counters = _leaf->as_FastLock()->counters();\n", indent);
3876 fprintf(fp_cpp, " %sNode *node = new (C) %sNode();\n", name, name);
3879 fprintf(fp_cpp, " node->_bottom_type = bottom_type();\n");
3884 fprintf(fp_cpp," node->_num_opnds = %d;\n", num_unique_opnds());
3888 fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
3889 fprintf(fp_cpp, " fill_new_machnode(node, C);\n");
3892 fprintf(fp_cpp, " node->set_opnd_array(cisc_operand(), new (C) %sOper(offset));\n", cisc_oper_name);
3896 fprintf(fp_cpp, " return node;\n");
3923 fprintf(fp_cpp, " %sNode *node = new (C) %sNode();\n", name, name);
3925 fprintf(fp_cpp, " node->_prob = _prob;\n");
3926 fprintf(fp_cpp, " node->_fcnt = _fcnt;\n");
3930 fprintf(fp_cpp, " node->_bottom_type = bottom_type();\n");
3934 // Short branch version must use same node index for access
3936 fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
3937 fprintf(fp_cpp, " fill_new_machnode(node, C);\n");
3940 fprintf(fp_cpp, " return node;\n");
3987 fprintf(fp_cpp, " return node;\n");