From 9813f8be5d454648e72d39270be7d6500e4a6def Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 28 Jan 2015 15:38:42 +0000 Subject: [PATCH] R600: Use a Southern Islands GPU as the default for the amdgcn target git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227314 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/AMDGPUSubtarget.cpp | 7 +++++-- lib/Target/R600/AMDGPUSubtarget.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Target/R600/AMDGPUSubtarget.cpp b/lib/Target/R600/AMDGPUSubtarget.cpp index 1154a70fe35..b5c1af451fc 100644 --- a/lib/Target/R600/AMDGPUSubtarget.cpp +++ b/lib/Target/R600/AMDGPUSubtarget.cpp @@ -31,7 +31,7 @@ using namespace llvm; #include "AMDGPUGenSubtargetInfo.inc" AMDGPUSubtarget & -AMDGPUSubtarget::initializeSubtargetDependencies(StringRef GPU, StringRef FS) { +AMDGPUSubtarget::initializeSubtargetDependencies(StringRef TT, StringRef GPU, StringRef FS) { // Determine default and user-specified characteristics // On SI+, we want FP64 denormals to be on by default. FP32 denormals can be // enabled, but some instructions do not respect them and they run at the @@ -44,6 +44,9 @@ AMDGPUSubtarget::initializeSubtargetDependencies(StringRef GPU, StringRef FS) { SmallString<256> FullFS("+promote-alloca,+fp64-denormals,"); FullFS += FS; + if (GPU == "" && Triple(TT).getArch() == Triple::amdgcn) + GPU = "SI"; + ParseSubtargetFeatures(GPU, FullFS); // FIXME: I don't think think Evergreen has any useful support for @@ -80,7 +83,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(StringRef TT, StringRef GPU, StringRef FS, EnablePromoteAlloca(false), EnableIfCvt(true), EnableLoadStoreOpt(false), WavefrontSize(0), CFALUBug(false), LocalMemorySize(0), EnableVGPRSpilling(false), - DL(computeDataLayout(initializeSubtargetDependencies(GPU, FS))), + DL(computeDataLayout(initializeSubtargetDependencies(TT, GPU, FS))), FrameLowering(TargetFrameLowering::StackGrowsUp, 64 * 16, // Maximum stack alignment (long16) 0), diff --git a/lib/Target/R600/AMDGPUSubtarget.h b/lib/Target/R600/AMDGPUSubtarget.h index 7ba97cc69d0..b287fe6d21b 100644 --- a/lib/Target/R600/AMDGPUSubtarget.h +++ b/lib/Target/R600/AMDGPUSubtarget.h @@ -76,7 +76,8 @@ private: public: AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS, TargetMachine &TM); - AMDGPUSubtarget &initializeSubtargetDependencies(StringRef GPU, StringRef FS); + AMDGPUSubtarget &initializeSubtargetDependencies(StringRef TT, StringRef GPU, + StringRef FS); // FIXME: This routine needs to go away. See comments in // AMDGPUTargetMachine.h. -- 2.34.1