1170 fprintf(fp_hpp, "// Mapping from machine-independent opcode to boolean\n");
1171 fprintf(fp_hpp, "// Flag cases where machine needs cloned values or instructions\n");
1172 fprintf(fp_hpp, "extern const char must_clone[];\n");
1173 fprintf(fp_hpp, "\n");
1174
1175 // Build mapping from ideal names to ideal indices
1176 fprintf(fp_cpp, "\n");
1177 fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n");
1178 fprintf(fp_cpp, "const char must_clone[] = {\n");
1179 for (int idealIndex = 0; idealIndex < _last_opcode; ++idealIndex) {
1180 int must_clone = 0;
1181 const char *idealName = NodeClassNames[idealIndex];
1182 // Previously selected constants for cloning
1183 // !!!!!
1184 // These are the current machine-dependent clones
1185 if ( strcmp(idealName,"CmpI") == 0
1186 || strcmp(idealName,"CmpU") == 0
1187 || strcmp(idealName,"CmpP") == 0
1188 || strcmp(idealName,"CmpN") == 0
1189 || strcmp(idealName,"CmpL") == 0
1190 || strcmp(idealName,"CmpD") == 0
1191 || strcmp(idealName,"CmpF") == 0
1192 || strcmp(idealName,"FastLock") == 0
1193 || strcmp(idealName,"FastUnlock") == 0
1194 || strcmp(idealName,"Bool") == 0
1195 || strcmp(idealName,"Binary") == 0 ) {
1196 // Removed ConI from the must_clone list. CPUs that cannot use
1197 // large constants as immediates manifest the constant as an
1198 // instruction. The must_clone flag prevents the constant from
1199 // floating up out of loops.
1200 must_clone = 1;
1201 }
1202 fprintf(fp_cpp, " %d%s // %s: %d\n", must_clone,
1203 (idealIndex != (_last_opcode - 1)) ? "," : " // no trailing comma",
1204 idealName, idealIndex);
1205 }
1206 // Finish defining table
1207 fprintf(fp_cpp, "};\n");
1208 }
|
1170 fprintf(fp_hpp, "// Mapping from machine-independent opcode to boolean\n");
1171 fprintf(fp_hpp, "// Flag cases where machine needs cloned values or instructions\n");
1172 fprintf(fp_hpp, "extern const char must_clone[];\n");
1173 fprintf(fp_hpp, "\n");
1174
1175 // Build mapping from ideal names to ideal indices
1176 fprintf(fp_cpp, "\n");
1177 fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n");
1178 fprintf(fp_cpp, "const char must_clone[] = {\n");
1179 for (int idealIndex = 0; idealIndex < _last_opcode; ++idealIndex) {
1180 int must_clone = 0;
1181 const char *idealName = NodeClassNames[idealIndex];
1182 // Previously selected constants for cloning
1183 // !!!!!
1184 // These are the current machine-dependent clones
1185 if ( strcmp(idealName,"CmpI") == 0
1186 || strcmp(idealName,"CmpU") == 0
1187 || strcmp(idealName,"CmpP") == 0
1188 || strcmp(idealName,"CmpN") == 0
1189 || strcmp(idealName,"CmpL") == 0
1190 || strcmp(idealName,"CmpUL") == 0
1191 || strcmp(idealName,"CmpD") == 0
1192 || strcmp(idealName,"CmpF") == 0
1193 || strcmp(idealName,"FastLock") == 0
1194 || strcmp(idealName,"FastUnlock") == 0
1195 || strcmp(idealName,"Bool") == 0
1196 || strcmp(idealName,"Binary") == 0 ) {
1197 // Removed ConI from the must_clone list. CPUs that cannot use
1198 // large constants as immediates manifest the constant as an
1199 // instruction. The must_clone flag prevents the constant from
1200 // floating up out of loops.
1201 must_clone = 1;
1202 }
1203 fprintf(fp_cpp, " %d%s // %s: %d\n", must_clone,
1204 (idealIndex != (_last_opcode - 1)) ? "," : " // no trailing comma",
1205 idealName, idealIndex);
1206 }
1207 // Finish defining table
1208 fprintf(fp_cpp, "};\n");
1209 }
|