Triple: Add amdgcn triple

This will be used for AMD GPUs with the Graphics Core Next architecture,
which are currently using by the r600 triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2015-01-06 18:00:00 +00:00
parent 7d710486d4
commit a31ae5e0b0
2 changed files with 9 additions and 1 deletions

View File

@ -60,6 +60,7 @@ public:
ppc64, // PPC64: powerpc64, ppu
ppc64le, // PPC64LE: powerpc64le
r600, // R600: AMD GPUs HD2XXX - HD6XXX
amdgcn, // AMDGCN: AMD GCN GPUs
sparc, // Sparc: sparc
sparcv9, // Sparcv9: Sparcv9
systemz, // SystemZ: s390x

View File

@ -33,6 +33,7 @@ const char *Triple::getArchTypeName(ArchType Kind) {
case ppc64le: return "powerpc64le";
case ppc: return "powerpc";
case r600: return "r600";
case amdgcn: return "amdgcn";
case sparc: return "sparc";
case sparcv9: return "sparcv9";
case systemz: return "s390x";
@ -82,7 +83,8 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
case hexagon: return "hexagon";
case r600: return "r600";
case amdgcn:
case r600: return "amdgpu";
case sparcv9:
case sparc: return "sparc";
@ -199,6 +201,7 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
.Case("ppc", ppc)
.Case("ppc64le", ppc64le)
.Case("r600", r600)
.Case("amdgcn", amdgcn)
.Case("hexagon", hexagon)
.Case("sparc", sparc)
.Case("sparcv9", sparcv9)
@ -286,6 +289,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Cases("mips64", "mips64eb", Triple::mips64)
.Case("mips64el", Triple::mips64el)
.Case("r600", Triple::r600)
.Case("amdgcn", Triple::amdgcn)
.Case("hexagon", Triple::hexagon)
.Case("s390x", Triple::systemz)
.Case("sparc", Triple::sparc)
@ -864,6 +868,7 @@ static unsigned getArchPointerBitWidth(llvm::Triple::ArchType Arch) {
case llvm::Triple::aarch64:
case llvm::Triple::aarch64_be:
case llvm::Triple::amdgcn:
case llvm::Triple::le64:
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
@ -899,6 +904,7 @@ Triple Triple::get32BitArchVariant() const {
case Triple::UnknownArch:
case Triple::aarch64:
case Triple::aarch64_be:
case Triple::amdgcn:
case Triple::msp430:
case Triple::systemz:
case Triple::ppc64le:
@ -962,6 +968,7 @@ Triple Triple::get64BitArchVariant() const {
case Triple::aarch64_be:
case Triple::le64:
case Triple::amdil64:
case Triple::amdgcn:
case Triple::hsail64:
case Triple::spir64:
case Triple::mips64: