aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-07-08 06:44:36 +0000
committerCraig Topper <craig.topper@intel.com>2017-07-08 06:44:36 +0000
commit5814cdbb68da49626cc3103264acc2f6422d7a1b (patch)
tree39a8a49fb07ce6ca7a0d74e1ce15d77f08bbbdb5
parent6fd36d21efd0e0986087374dfd8b117d59f776c4 (diff)
[X86] In getHostCPUName, remove some code that changes some AMD CPU names based on features not being enabled.
The CPU name is really just used for scheduler and other microarchitectural optimizations. The feature flags should be determined by getHostCPUFeatures which should always be used with getHostCPUName. Trying to alter CPU name strings to control features just isn't practical. Most of these types of things were removed from Intel CPUs a while ago. This is part of my plan to bring compiler-rt's cpu_model.c file up to date with the equivalent functionality in libgcc. A lot of the code in that file is copied from Host.cpp and we want to keep them reasonably in sync. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307467 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Support/Host.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp
index a552a1e82a7..8469ae4f241 100644
--- a/lib/Support/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -910,11 +910,6 @@ static void getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model,
break; // "btver1";
case 21:
*Type = AMDFAM15H;
- if (!(Features &
- (1 << FEATURE_AVX))) { // If no AVX support, provide a sane fallback.
- *Subtype = AMD_BTVER1;
- break; // "btver1"
- }
if (Model >= 0x60 && Model <= 0x7f) {
*Subtype = AMDFAM15H_BDVER4;
break; // "bdver4"; 50h-6Fh: Excavator
@@ -934,20 +929,11 @@ static void getAMDProcessorTypeAndSubtype(unsigned Family, unsigned Model,
break;
case 22:
*Type = AMDFAM16H;
- if (!(Features &
- (1 << FEATURE_AVX))) { // If no AVX support provide a sane fallback.
- *Subtype = AMD_BTVER1;
- break; // "btver1";
- }
*Subtype = AMD_BTVER2;
break; // "btver2"
case 23:
*Type = AMDFAM17H;
- if (Features & (1 << FEATURE_ADX)) {
- *Subtype = AMDFAM17H_ZNVER1;
- break; // "znver1"
- }
- *Subtype = AMD_BTVER1;
+ *Subtype = AMDFAM17H_ZNVER1;
break;
default:
break; // "generic"