diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-08-20 07:07:29 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-08-20 07:07:29 +0000 |
commit | 33b4cde2f247ce251a91b8309193e12a45eed129 (patch) | |
tree | 2559f29a7736c92b01249e0f2b4cafdba502f5e4 /clang/lib/Basic | |
parent | ffb7180e962e299facbb13ff4da517782baf262a (diff) | |
download | bcm5719-llvm-33b4cde2f247ce251a91b8309193e12a45eed129.tar.gz bcm5719-llvm-33b4cde2f247ce251a91b8309193e12a45eed129.zip |
Revert r188756 because some other changes snuck in with it.
llvm-svn: 188757
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 63 |
1 files changed, 14 insertions, 49 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 02c5935f290..c4772723e90 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -1570,7 +1570,7 @@ const TargetInfo::AddlRegName AddlRegNames[] = { // most of the implementation can be shared. class X86TargetInfo : public TargetInfo { enum X86SSEEnum { - NoSSE, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, AVX, AVX2, AVX512 + NoSSE, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, AVX, AVX2 } SSELevel; enum MMX3DNowEnum { NoMMX3DNow, MMX, AMD3DNow, AMD3DNowAthlon @@ -1675,10 +1675,6 @@ class X86TargetInfo : public TargetInfo { CK_CoreAVX2, //@} - /// \name Knights Landing - /// Knights Landing processor. - CK_KNL, - /// \name K6 /// K6 architecture processors. //@{ @@ -1822,7 +1818,6 @@ public: .Case("corei7-avx", CK_Corei7AVX) .Case("core-avx-i", CK_CoreAVXi) .Case("core-avx2", CK_CoreAVX2) - .Case("knl", CK_KNL) .Case("k6", CK_K6) .Case("k6-2", CK_K6_2) .Case("k6-3", CK_K6_3) @@ -1897,7 +1892,6 @@ public: case CK_Corei7AVX: case CK_CoreAVXi: case CK_CoreAVX2: - case CK_KNL: case CK_Athlon64: case CK_Athlon64SSE3: case CK_AthlonFX: @@ -1947,7 +1941,6 @@ void X86TargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const { Features["pclmul"] = false; Features["avx"] = false; Features["avx2"] = false; - Features["avx512"] = false; Features["lzcnt"] = false; Features["rdrand"] = false; Features["bmi"] = false; @@ -2031,18 +2024,6 @@ void X86TargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const { setFeatureEnabled(Features, "rtm", true); setFeatureEnabled(Features, "fma", true); break; - case CK_KNL: - setFeatureEnabled(Features, "avx512", true); - setFeatureEnabled(Features, "aes", true); - setFeatureEnabled(Features, "pclmul", true); - setFeatureEnabled(Features, "lzcnt", true); - setFeatureEnabled(Features, "rdrnd", true); - setFeatureEnabled(Features, "f16c", true); - setFeatureEnabled(Features, "bmi", true); - setFeatureEnabled(Features, "bmi2", true); - setFeatureEnabled(Features, "rtm", true); - setFeatureEnabled(Features, "fma", true); - break; case CK_K6: case CK_WinChipC6: setFeatureEnabled(Features, "mmx", true); @@ -2168,11 +2149,6 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features, Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = Features["popcnt"] = Features["avx"] = Features["avx2"] = true; - else if (Name == "avx512") - Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = - Features["ssse3"] = Features["sse41"] = Features["sse42"] = - Features["popcnt"] = Features["avx"] = Features["avx2"] = - Features["avx512"] = true; else if (Name == "fma") Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = @@ -2215,29 +2191,28 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features, Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = Features["sse4a"] = Features["avx"] = Features["avx2"] = - Features["avx512"] = Features["fma"] = Features["fma4"] = - Features["aes"] = Features["pclmul"] = Features["xop"] = false; + Features["fma"] = Features["fma4"] = Features["aes"] = + Features["pclmul"] = Features["xop"] = false; else if (Name == "sse2") Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = Features["sse4a"] = - Features["avx"] = Features["avx2"] = Features["avx512"] = - Features["fma"] = Features["fma4"] = Features["aes"] = - Features["pclmul"] = Features["xop"] = false; + Features["avx"] = Features["avx2"] = Features["fma"] = + Features["fma4"] = Features["aes"] = Features["pclmul"] = + Features["xop"] = false; else if (Name == "sse3") Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = Features["sse4a"] = Features["avx"] = - Features["avx2"] = Features["avx512"] = Features["fma"] = - Features["fma4"] = Features["xop"] = false; + Features["avx2"] = Features["fma"] = Features["fma4"] = + Features["xop"] = false; else if (Name == "ssse3") Features["ssse3"] = Features["sse41"] = Features["sse42"] = - Features["avx"] = Features["avx2"] = Features["avx512"] = - Features["fma"] = false; + Features["avx"] = Features["avx2"] = Features["fma"] = false; else if (Name == "sse4" || Name == "sse4.1") Features["sse41"] = Features["sse42"] = Features["avx"] = - Features["avx2"] = Features["avx512"] = Features["fma"] = false; + Features["avx2"] = Features["fma"] = false; else if (Name == "sse4.2") Features["sse42"] = Features["avx"] = Features["avx2"] = - Features["avx512"] = Features["fma"] = false; + Features["fma"] = false; else if (Name == "3dnow") Features["3dnow"] = Features["3dnowa"] = false; else if (Name == "3dnowa") @@ -2247,12 +2222,10 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features, else if (Name == "pclmul") Features["pclmul"] = false; else if (Name == "avx") - Features["avx"] = Features["avx2"] = Features["avx512"] = - Features["fma"] = Features["fma4"] = Features["xop"] = false; + Features["avx"] = Features["avx2"] = Features["fma"] = + Features["fma4"] = Features["xop"] = false; else if (Name == "avx2") - Features["avx2"] = Features["avx512"] = false; - else if (Name == "avx512") - Features["avx512"] = false; + Features["avx2"] = false; else if (Name == "fma") Features["fma"] = false; else if (Name == "sse4a") @@ -2372,7 +2345,6 @@ void X86TargetInfo::HandleTargetFeatures(std::vector<std::string> &Features) { assert(Features[i][0] == '+' && "Invalid target feature!"); X86SSEEnum Level = llvm::StringSwitch<X86SSEEnum>(Feature) - .Case("avx512", AVX512) .Case("avx2", AVX2) .Case("avx", AVX) .Case("sse42", SSE42) @@ -2483,9 +2455,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, case CK_CoreAVX2: defineCPUMacros(Builder, "corei7"); break; - case CK_KNL: - defineCPUMacros(Builder, "knl"); - break; case CK_K6_2: Builder.defineMacro("__k6_2__"); Builder.defineMacro("__tune_k6_2__"); @@ -2599,8 +2568,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, // Each case falls through to the previous one here. switch (SSELevel) { - case AVX512: - Builder.defineMacro("__AVX512__"); case AVX2: Builder.defineMacro("__AVX2__"); case AVX: @@ -2625,7 +2592,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, if (Opts.MicrosoftExt && getTriple().getArch() == llvm::Triple::x86) { switch (SSELevel) { - case AVX512: case AVX2: case AVX: case SSE42: @@ -2669,7 +2635,6 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const { .Case("aes", HasAES) .Case("avx", SSELevel >= AVX) .Case("avx2", SSELevel >= AVX2) - .Case("avx512", SSELevel >= AVX512) .Case("bmi", HasBMI) .Case("bmi2", HasBMI2) .Case("fma", HasFMA) |