Differential Revision: https://reviews.llvm.org/D45061
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329830
91177308-0d34-0410-b5e6-
96231b3b80d8
bool NVPTXTargetInfo::hasFeature(StringRef Feature) const {
return llvm::StringSwitch<bool>(Feature)
.Cases("ptx", "nvptx", true)
- .Case("satom", GPU >= CudaArch::SM_60) // Atomics w/ scope.
.Default(false);
}
StringRef CPU,
const std::vector<std::string> &FeaturesVec) const override {
Features[CudaArchToString(GPU)] = true;
- Features["satom"] = GPU >= CudaArch::SM_60;
Features["ptx" + std::to_string(PTXVersion)] = true;
return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
}