summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/ToolChains')
-rw-r--r--clang/lib/Driver/ToolChains/Cuda.cpp15
-rw-r--r--clang/lib/Driver/ToolChains/Cuda.h11
2 files changed, 5 insertions, 21 deletions
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index 4d040a204dd..4f740fc9525 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -542,9 +542,9 @@ CudaToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args,
// flags are not duplicated.
// Also append the compute capability.
if (DeviceOffloadKind == Action::OFK_OpenMP) {
- for (Arg *A : Args){
+ for (Arg *A : Args) {
bool IsDuplicate = false;
- for (Arg *DALArg : *DAL){
+ for (Arg *DALArg : *DAL) {
if (A == DALArg) {
IsDuplicate = true;
break;
@@ -555,14 +555,9 @@ CudaToolChain::TranslateArgs(const llvm::opt::DerivedArgList &Args,
}
StringRef Arch = DAL->getLastArgValue(options::OPT_march_EQ);
- if (Arch.empty()) {
- // Default compute capability for CUDA toolchain is the
- // lowest compute capability supported by the installed
- // CUDA version.
- DAL->AddJoinedArg(nullptr,
- Opts.getOption(options::OPT_march_EQ),
- CudaInstallation.getLowestExistingArch());
- }
+ if (Arch.empty())
+ DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_march_EQ),
+ CLANG_OPENMP_NVPTX_DEFAULT_ARCH);
return DAL;
}
diff --git a/clang/lib/Driver/ToolChains/Cuda.h b/clang/lib/Driver/ToolChains/Cuda.h
index 5144f5b40bb..1e30aa72702 100644
--- a/clang/lib/Driver/ToolChains/Cuda.h
+++ b/clang/lib/Driver/ToolChains/Cuda.h
@@ -76,17 +76,6 @@ public:
std::string getLibDeviceFile(StringRef Gpu) const {
return LibDeviceMap.lookup(Gpu);
}
- /// \brief Get lowest available compute capability
- /// for which a libdevice library exists.
- std::string getLowestExistingArch() const {
- std::string LibDeviceFile;
- for (auto key : LibDeviceMap.keys()) {
- LibDeviceFile = LibDeviceMap.lookup(key);
- if (!LibDeviceFile.empty())
- return key;
- }
- return "sm_20";
- }
};
namespace tools {
OpenPOWER on IntegriCloud