comparison src/share/vm/adlc/output_c.cpp @ 785:2056494941db

6814842: Load shortening optimizations Summary: 6797305 handles load widening but no shortening which should be covered here. Reviewed-by: never, kvn
author twisti
date Wed, 13 May 2009 00:45:22 -0700
parents 337400e7a5dd
children 844a9d73ec22
comparison
equal deleted inserted replaced
784:b2934faac289 785:2056494941db
1743 // delete the rest of edges 1743 // delete the rest of edges
1744 fprintf(fp," for(int i = idx%d - 1; i >= (int)idx%d; i--) {\n", cur_num_opnds, new_num_opnds); 1744 fprintf(fp," for(int i = idx%d - 1; i >= (int)idx%d; i--) {\n", cur_num_opnds, new_num_opnds);
1745 fprintf(fp," del_req(i);\n"); 1745 fprintf(fp," del_req(i);\n");
1746 fprintf(fp," }\n"); 1746 fprintf(fp," }\n");
1747 fprintf(fp," _num_opnds = %d;\n", new_num_opnds); 1747 fprintf(fp," _num_opnds = %d;\n", new_num_opnds);
1748 assert(new_num_opnds == node->num_unique_opnds(), "what?");
1748 } 1749 }
1749 } 1750 }
1750 1751
1751 1752
1752 // Generate projections for instruction's additional DEFs and KILLs 1753 // Generate projections for instruction's additional DEFs and KILLs
3759 fprintf(fp_cpp, " %sNode *node = new (C) %sNode();\n", name, name); 3760 fprintf(fp_cpp, " %sNode *node = new (C) %sNode();\n", name, name);
3760 // Fill in the bottom_type where requested 3761 // Fill in the bottom_type where requested
3761 if ( this->captures_bottom_type() ) { 3762 if ( this->captures_bottom_type() ) {
3762 fprintf(fp_cpp, " node->_bottom_type = bottom_type();\n"); 3763 fprintf(fp_cpp, " node->_bottom_type = bottom_type();\n");
3763 } 3764 }
3765
3766 uint cur_num_opnds = num_opnds();
3767 if (cur_num_opnds > 1 && cur_num_opnds != num_unique_opnds()) {
3768 fprintf(fp_cpp," node->_num_opnds = %d;\n", num_unique_opnds());
3769 }
3770
3764 fprintf(fp_cpp, "\n"); 3771 fprintf(fp_cpp, "\n");
3765 fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n"); 3772 fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
3766 fprintf(fp_cpp, " fill_new_machnode(node, C);\n"); 3773 fprintf(fp_cpp, " fill_new_machnode(node, C);\n");
3767 // Construct operand to access [stack_pointer + offset] 3774 // Construct operand to access [stack_pointer + offset]
3768 fprintf(fp_cpp, " // Construct operand to access [stack_pointer + offset]\n"); 3775 fprintf(fp_cpp, " // Construct operand to access [stack_pointer + offset]\n");