[llvm] r272333 - Reapply 272328 and 272329 as a single patch.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 16:04:15 PDT 2016
Author: asbirlea
Date: Thu Jun 9 18:04:15 2016
New Revision: 272333
URL: http://llvm.org/viewvc/llvm-project?rev=272333&view=rev
Log:
Reapply 272328 and 272329 as a single patch.
[cpu-detection] [amdfam10] Return barcelona, and amdfam10 for all other
subtypes. Address Bug 28067.
Along with the refactoring of Host.cpp, getHostCPUName() was modified to
return more precise types for CPUs in amdfam10.
However, callers of getHostCPUName() do string matching on type, so this
cannot be modified.
Currently there is support in the x86 backend for barcelona.
For all other subtypes the assumed return value is amdfam10.
Fix: getHostCPUName() returns barcelona subtype and amdfam10 for all
others. This can be extended further when support for the other subtypes
is added.
Differential revision: http://reviews.llvm.org/D21193
Modified:
llvm/trunk/lib/Support/Host.cpp
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=272333&r1=272332&r2=272333&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Thu Jun 9 18:04:15 2016
@@ -869,16 +869,9 @@ StringRef sys::getHostCPUName() {
return "athlon";
}
case AMDFAM10H:
- switch (Subtype) {
- case AMDFAM10H_BARCELONA:
- return "amdfam10-barcelona";
- case AMDFAM10H_SHANGHAI:
- return "amdfam10-shanghai";
- case AMDFAM10H_ISTANBUL:
- return "amdfam10-istanbul";
- default:
- return "amdfam10";
- }
+ if(Subtype == AMDFAM10H_BARCELONA)
+ return "barcelona";
+ return "amdfam10";
case AMDFAM14H:
return "btver1";
case AMDFAM15H:
More information about the llvm-commits
mailing list