summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2014-06-27 18:35:18 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2014-06-27 18:35:18 +0000
commit602fa5b5d129ca375e435f28b9106adbfb343a5e (patch)
tree725e6803f133946c7eb08475328218ed6914804d /llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
parentc3f31ebe6e17a024e42fa526975564d5c04b8776 (diff)
downloadbcm5719-llvm-602fa5b5d129ca375e435f28b9106adbfb343a5e.tar.gz
bcm5719-llvm-602fa5b5d129ca375e435f28b9106adbfb343a5e.zip
[NVPTX] Add target options for PTX 3.2/4.0 and SM 5.0 (Maxwell)
Default PTX version is set to PTX 3.2 llvm-svn: 211929
Diffstat (limited to 'llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp')
-rw-r--r--llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp b/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
index dfce221c424..d5cded21836 100644
--- a/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
@@ -45,13 +45,10 @@ NVPTXSubtarget &NVPTXSubtarget::initializeSubtargetDependencies(StringRef CPU,
ParseSubtargetFeatures(TargetName, FS);
- // We default to PTX 3.1, but we cannot just default to it in the initializer
- // since the attribute parser checks if the given option is >= the default.
- // So if we set ptx31 as the default, the ptx30 attribute would never match.
- // Instead, we use 0 as the default and manually set 31 if the default is
- // used.
- if (PTXVersion == 0)
- PTXVersion = 31;
+ // Set default to PTX 3.2 (CUDA 5.5)
+ if (PTXVersion == 0) {
+ PTXVersion = 32;
+ }
return *this;
}
OpenPOWER on IntegriCloud