summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-01-28 15:38:42 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-01-28 15:38:42 +0000
commiteba5648ad2c576eacd51f93c4bd00888b970683a (patch)
treef6dc042921fcac42b05e5d30a29442eeafa6f361 /llvm/lib
parent77366097f46f7a1cd4ad08e546d64fcda0656fee (diff)
downloadbcm5719-llvm-eba5648ad2c576eacd51f93c4bd00888b970683a.tar.gz
bcm5719-llvm-eba5648ad2c576eacd51f93c4bd00888b970683a.zip
R600: Use a Southern Islands GPU as the default for the amdgcn target
llvm-svn: 227314
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/R600/AMDGPUSubtarget.cpp7
-rw-r--r--llvm/lib/Target/R600/AMDGPUSubtarget.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUSubtarget.cpp b/llvm/lib/Target/R600/AMDGPUSubtarget.cpp
index 1154a70fe35..b5c1af451fc 100644
--- a/llvm/lib/Target/R600/AMDGPUSubtarget.cpp
+++ b/llvm/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/llvm/lib/Target/R600/AMDGPUSubtarget.h b/llvm/lib/Target/R600/AMDGPUSubtarget.h
index 7ba97cc69d0..b287fe6d21b 100644
--- a/llvm/lib/Target/R600/AMDGPUSubtarget.h
+++ b/llvm/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.
OpenPOWER on IntegriCloud