src/share/vm/adlc/archDesc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/adlc

src/share/vm/adlc/archDesc.cpp

Print this page
rev 5902 : 8027754: Enable loop optimizations for loops with MathExact inside


1150 
1151   // Build mapping from ideal names to ideal indices
1152   fprintf(fp_cpp, "\n");
1153   fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n");
1154   fprintf(fp_cpp, "const        char must_clone[] = {\n");
1155   for (int idealIndex = 0; idealIndex < _last_opcode; ++idealIndex) {
1156     int         must_clone = 0;
1157     const char *idealName = NodeClassNames[idealIndex];
1158     // Previously selected constants for cloning
1159     // !!!!!
1160     // These are the current machine-dependent clones
1161     if ( strcmp(idealName,"CmpI") == 0
1162          || strcmp(idealName,"CmpU") == 0
1163          || strcmp(idealName,"CmpP") == 0
1164          || strcmp(idealName,"CmpN") == 0
1165          || strcmp(idealName,"CmpL") == 0
1166          || strcmp(idealName,"CmpD") == 0
1167          || strcmp(idealName,"CmpF") == 0
1168          || strcmp(idealName,"FastLock") == 0
1169          || strcmp(idealName,"FastUnlock") == 0
1170          || strcmp(idealName,"AddExactI") == 0
1171          || strcmp(idealName,"AddExactL") == 0
1172          || strcmp(idealName,"SubExactI") == 0
1173          || strcmp(idealName,"SubExactL") == 0
1174          || strcmp(idealName,"MulExactI") == 0
1175          || strcmp(idealName,"MulExactL") == 0
1176          || strcmp(idealName,"NegExactI") == 0
1177          || strcmp(idealName,"NegExactL") == 0
1178          || strcmp(idealName,"FlagsProj") == 0
1179          || strcmp(idealName,"Bool") == 0
1180          || strcmp(idealName,"Binary") == 0 ) {
1181       // Removed ConI from the must_clone list.  CPUs that cannot use
1182       // large constants as immediates manifest the constant as an
1183       // instruction.  The must_clone flag prevents the constant from
1184       // floating up out of loops.
1185       must_clone = 1;
1186     }
1187     fprintf(fp_cpp, "  %d%s // %s: %d\n", must_clone,
1188       (idealIndex != (_last_opcode - 1)) ? "," : " // no trailing comma",
1189       idealName, idealIndex);
1190   }
1191   // Finish defining table
1192   fprintf(fp_cpp, "};\n");
1193 }


1150 
1151   // Build mapping from ideal names to ideal indices
1152   fprintf(fp_cpp, "\n");
1153   fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n");
1154   fprintf(fp_cpp, "const        char must_clone[] = {\n");
1155   for (int idealIndex = 0; idealIndex < _last_opcode; ++idealIndex) {
1156     int         must_clone = 0;
1157     const char *idealName = NodeClassNames[idealIndex];
1158     // Previously selected constants for cloning
1159     // !!!!!
1160     // These are the current machine-dependent clones
1161     if ( strcmp(idealName,"CmpI") == 0
1162          || strcmp(idealName,"CmpU") == 0
1163          || strcmp(idealName,"CmpP") == 0
1164          || strcmp(idealName,"CmpN") == 0
1165          || strcmp(idealName,"CmpL") == 0
1166          || strcmp(idealName,"CmpD") == 0
1167          || strcmp(idealName,"CmpF") == 0
1168          || strcmp(idealName,"FastLock") == 0
1169          || strcmp(idealName,"FastUnlock") == 0
1170          || strcmp(idealName,"OverflowAddI") == 0
1171          || strcmp(idealName,"OverflowAddL") == 0
1172          || strcmp(idealName,"OverflowSubI") == 0
1173          || strcmp(idealName,"OverflowSubL") == 0
1174          || strcmp(idealName,"OverflowMulI") == 0
1175          || strcmp(idealName,"OverflowMulL") == 0



1176          || strcmp(idealName,"Bool") == 0
1177          || strcmp(idealName,"Binary") == 0 ) {
1178       // Removed ConI from the must_clone list.  CPUs that cannot use
1179       // large constants as immediates manifest the constant as an
1180       // instruction.  The must_clone flag prevents the constant from
1181       // floating up out of loops.
1182       must_clone = 1;
1183     }
1184     fprintf(fp_cpp, "  %d%s // %s: %d\n", must_clone,
1185       (idealIndex != (_last_opcode - 1)) ? "," : " // no trailing comma",
1186       idealName, idealIndex);
1187   }
1188   // Finish defining table
1189   fprintf(fp_cpp, "};\n");
1190 }
src/share/vm/adlc/archDesc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File