llvm.org GIT mirror llvm / 719506a
[X86] Simplify the getHostCPUName for AMD family 6 and 15. As far as I can tell we can simply distinguish based on features rather than model number. Many of the strings we were previously using are treated the same by the backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307884 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 3 years ago
1 changed file(s) with 11 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
335335 AMDPENTIUM_K62,
336336 AMDPENTIUM_K63,
337337 AMDPENTIUM_GEODE,
338 AMDATHLON_TBIRD,
339 AMDATHLON_MP,
338 AMDATHLON_CLASSIC,
340339 AMDATHLON_XP,
340 AMDATHLON_K8,
341341 AMDATHLON_K8SSE3,
342 AMDATHLON_OPTERON,
343 AMDATHLON_FX,
344 AMDATHLON_64,
345342 CPU_SUBTYPE_MAX
346343 };
347344
867864 break;
868865 case 6:
869866 *Type = AMDATHLON;
870 switch (Model) {
871 case 4:
872 *Subtype = AMDATHLON_TBIRD;
873 break; // "athlon-tbird"
874 case 6:
875 case 7:
876 case 8:
877 *Subtype = AMDATHLON_MP;
878 break; // "athlon-mp"
879 case 10:
867 if (Features & (1 << FEATURE_SSE)) {
880868 *Subtype = AMDATHLON_XP;
881869 break; // "athlon-xp"
882870 }
883 break;
871 *Subtype = AMDATHLON_CLASSIC;
872 break; // "athlon"
884873 case 15:
885874 *Type = AMDATHLON;
886875 if (Features & (1 << FEATURE_SSE3)) {
887876 *Subtype = AMDATHLON_K8SSE3;
888877 break; // "k8-sse3"
889878 }
890 switch (Model) {
891 case 1:
892 *Subtype = AMDATHLON_OPTERON;
893 break; // "opteron"
894 case 5:
895 *Subtype = AMDATHLON_FX;
896 break; // "athlon-fx"; also opteron
897 default:
898 *Subtype = AMDATHLON_64;
899 break; // "athlon64"
900 }
901 break;
879 *Subtype = AMDATHLON_K8;
880 break; // "k8"
902881 case 16:
903882 *Type = AMDFAM10H; // "amdfam10"
904883 switch (Model) {
11671146 }
11681147 case AMDATHLON:
11691148 switch (Subtype) {
1170 case AMDATHLON_TBIRD:
1171 return "athlon-tbird";
1172 case AMDATHLON_MP:
1173 return "athlon-mp";
1149 case AMDATHLON_CLASSIC:
1150 return "athlon";
11741151 case AMDATHLON_XP:
11751152 return "athlon-xp";
1153 case AMDATHLON_K8:
1154 return "k8";
11761155 case AMDATHLON_K8SSE3:
11771156 return "k8-sse3";
1178 case AMDATHLON_OPTERON:
1179 return "opteron";
1180 case AMDATHLON_FX:
1181 return "athlon-fx";
1182 case AMDATHLON_64:
1183 return "athlon64";
11841157 default:
11851158 llvm_unreachable("Unexpected subtype!");
11861159 }