Author: Nick Sarnie Date: 2025-03-28T14:19:20Z New Revision: 48b753027382a5815295d6680c7dd407be936c86
URL: https://github.com/llvm/llvm-project/commit/48b753027382a5815295d6680c7dd407be936c86 DIFF: https://github.com/llvm/llvm-project/commit/48b753027382a5815295d6680c7dd407be936c86.diff LOG: [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (#126956) I'm adding support for SPIR-V, so let's consolidate these checks. --------- Signed-off-by: Sarnie, Nick <nick.sar...@intel.com> Added: Modified: clang/include/clang/Basic/LangOptions.h clang/lib/AST/Decl.cpp clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenModule.h clang/lib/CodeGen/CodeGenPGO.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Frontend/CompilerInstance.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/lib/Frontend/InitPreprocessor.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaType.cpp clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp flang/lib/Frontend/CompilerInvocation.cpp flang/test/Lower/OpenMP/omp-is-gpu.f90 llvm/include/llvm/TargetParser/Triple.h llvm/include/llvm/Transforms/IPO/Attributor.h llvm/lib/ProfileData/InstrProf.cpp llvm/lib/Transforms/IPO/Attributor.cpp llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Basic/LangOptions.h b/clang/include/clang/Basic/LangOptions.h index e925e0f3b5d85..bbebf7af9ede3 100644 --- a/clang/include/clang/Basic/LangOptions.h +++ b/clang/include/clang/Basic/LangOptions.h @@ -838,6 +838,11 @@ class LangOptions : public LangOptionsBase { return FPExceptionModeKind::FPE_Ignore; return EM; } + + /// True when compiling for an offloading target device. + bool isTargetDevice() const { + return OpenMPIsTargetDevice || CUDAIsDevice || SYCLIsDevice; + } }; /// Floating point control options diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index e8aeacf24374f..5f5568518e0b9 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -810,8 +810,7 @@ LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D, // functions as the host-callable kernel functions are emitted at codegen. if (Context.getLangOpts().OpenMP && Context.getLangOpts().OpenMPIsTargetDevice && - ((Context.getTargetInfo().getTriple().isAMDGPU() || - Context.getTargetInfo().getTriple().isNVPTX()) || + (Context.getTargetInfo().getTriple().isGPU() || OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration(Function))) LV.mergeVisibility(HiddenVisibility, /*newExplicit=*/false); diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 06a652c146fb9..b706fa3759c0d 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -2614,8 +2614,7 @@ void CGOpenMPRuntime::emitDistributeStaticInit( llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; bool isGPUDistribute = - CGM.getLangOpts().OpenMPIsTargetDevice && - (CGM.getTriple().isAMDGCN() || CGM.getTriple().isNVPTX()); + CGM.getLangOpts().OpenMPIsTargetDevice && CGM.getTriple().isGPU(); StaticInitFunction = OMPBuilder.createForStaticInitFunction( Values.IVSize, Values.IVSigned, isGPUDistribute); @@ -2644,8 +2643,7 @@ void CGOpenMPRuntime::emitForStaticFinish(CodeGenFunction &CGF, getThreadID(CGF, Loc)}; auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc); if (isOpenMPDistributeDirective(DKind) && - CGM.getLangOpts().OpenMPIsTargetDevice && - (CGM.getTriple().isAMDGCN() || CGM.getTriple().isNVPTX())) + CGM.getLangOpts().OpenMPIsTargetDevice && CGM.getTriple().isGPU()) CGF.EmitRuntimeCall( OMPBuilder.getOrCreateRuntimeFunction( CGM.getModule(), OMPRTL___kmpc_distribute_static_fini), diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 96ab4dd1837ce..5dbd50be6ca1a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -843,7 +843,7 @@ static void setVisibilityFromDLLStorageClass(const clang::LangOptions &LO, static bool isStackProtectorOn(const LangOptions &LangOpts, const llvm::Triple &Triple, clang::LangOptions::StackProtectorMode Mode) { - if (Triple.isAMDGPU() || Triple.isNVPTX()) + if (Triple.isGPU()) return false; return LangOpts.getStackProtector() == Mode; } diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 6deb467b2cc9f..46de3d868f901 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1073,10 +1073,8 @@ class CodeGenModule : public CodeGenTypeCache { // Return whether RTTI information should be emitted for this target. bool shouldEmitRTTI(bool ForEH = false) { - return (ForEH || getLangOpts().RTTI) && !getLangOpts().CUDAIsDevice && - !(getLangOpts().OpenMP && getLangOpts().OpenMPIsTargetDevice && - (getTriple().isNVPTX() || getTriple().isAMDGPU() || - getTriple().isSPIRV())); + return (ForEH || getLangOpts().RTTI) && + (!getLangOpts().isTargetDevice() || !getTriple().isGPU()); } /// Get the address of the RTTI descriptor for the given type. diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index ff8b1339de966..83a5f20e79aba 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -1357,7 +1357,7 @@ void CodeGenPGO::setProfileVersion(llvm::Module &M) { IRLevelVersionVariable->setVisibility(llvm::GlobalValue::HiddenVisibility); llvm::Triple TT(M.getTargetTriple()); - if (TT.isAMDGPU() || TT.isNVPTX()) + if (TT.isGPU()) IRLevelVersionVariable->setVisibility( llvm::GlobalValue::ProtectedVisibility); if (TT.supportsCOMDAT()) { diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 40ecc0aee48b3..26fa234dd4e9b 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1100,8 +1100,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, if (JA.isDeviceOffloading(Action::OFK_OpenMP) && !Args.hasArg(options::OPT_nostdinc) && !Args.hasArg(options::OPT_nogpuinc) && - (getToolChain().getTriple().isNVPTX() || - getToolChain().getTriple().isAMDGCN())) { + getToolChain().getTriple().isGPU()) { if (!Args.hasArg(options::OPT_nobuiltininc)) { // Add openmp_wrappers/* to our system include path. This lets us wrap // standard library headers. @@ -1288,8 +1287,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, // Without an offloading language we will include these headers directly. // Offloading languages will instead only use the declarations stored in // the resource directory at clang/lib/Headers/llvm_libc_wrappers. - if ((getToolChain().getTriple().isNVPTX() || - getToolChain().getTriple().isAMDGCN()) && + if (getToolChain().getTriple().isGPU() && C.getActiveOffloadKinds() == Action::OFK_None) { SmallString<128> P(llvm::sys::path::parent_path(D.Dir)); llvm::sys::path::append(P, "include"); diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 4e13b6ced252f..91093d3ccb84c 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -116,8 +116,7 @@ bool CompilerInstance::createTarget() { // Check whether AuxTarget exists, if not, then create TargetInfo for the // other side of CUDA/OpenMP/SYCL compilation. if (!getAuxTarget() && - (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || - getLangOpts().SYCLIsDevice) && + (getLangOpts().CUDA || getLangOpts().isTargetDevice()) && !getFrontendOpts().AuxTriple.empty()) { auto TO = std::make_shared<TargetOptions>(); TO->Triple = llvm::Triple::normalize(getFrontendOpts().AuxTriple); diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 756ae10e0e635..572c71ef1001c 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4191,8 +4191,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL && Opts.OpenCLVersion == 200); - bool HasConvergentOperations = Opts.OpenMPIsTargetDevice || Opts.OpenCL || - Opts.CUDAIsDevice || Opts.SYCLIsDevice || + bool HasConvergentOperations = Opts.isTargetDevice() || Opts.OpenCL || Opts.HLSL || T.isAMDGPU() || T.isNVPTX(); Opts.ConvergentFunctions = Args.hasFlag(OPT_fconvergent_functions, OPT_fno_convergent_functions, diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 0b54665501c76..90d0f5c8c9d1a 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1568,9 +1568,7 @@ void clang::InitializePreprocessor(Preprocessor &PP, if (InitOpts.UsePredefines) { // FIXME: This will create multiple definitions for most of the predefined // macros. This is not the right way to handle this. - if ((LangOpts.CUDA || LangOpts.OpenMPIsTargetDevice || - LangOpts.SYCLIsDevice) && - PP.getAuxTargetInfo()) + if ((LangOpts.CUDA || LangOpts.isTargetDevice()) && PP.getAuxTargetInfo()) InitializePredefinedMacros(*PP.getAuxTargetInfo(), LangOpts, FEOpts, PP.getPreprocessorOpts(), Builder); diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 043e82414c052..5527ed5419fc8 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -7860,8 +7860,7 @@ NamedDecl *Sema::ActOnVariableDeclarator( diag::err_thread_non_global) << DeclSpec::getSpecifierName(TSCS); else if (!Context.getTargetInfo().isTLSSupported()) { - if (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || - getLangOpts().SYCLIsDevice) { + if (getLangOpts().CUDA || getLangOpts().isTargetDevice()) { // Postpone error emission until we've collected attributes required to // figure out whether it's a host or device variable and whether the // error should be ignored. @@ -7994,8 +7993,7 @@ NamedDecl *Sema::ActOnVariableDeclarator( if (const auto *TT = R->getAs<TypedefType>()) copyAttrFromTypedefToDecl<AllocSizeAttr>(*this, NewVD, TT); - if (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || - getLangOpts().SYCLIsDevice) { + if (getLangOpts().CUDA || getLangOpts().isTargetDevice()) { if (EmitTLSUnsupportedError && ((getLangOpts().CUDA && DeclAttrsMatchCUDAMode(getLangOpts(), NewVD)) || (getLangOpts().OpenMPIsTargetDevice && @@ -16586,9 +16584,8 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, DiscardCleanupsInEvaluationContext(); } - if (FD && ((LangOpts.OpenMP && (LangOpts.OpenMPIsTargetDevice || - !LangOpts.OMPTargetTriples.empty())) || - LangOpts.CUDA || LangOpts.SYCLIsDevice)) { + if (FD && (LangOpts.isTargetDevice() || LangOpts.CUDA || + (LangOpts.OpenMP && !LangOpts.OMPTargetTriples.empty()))) { auto ES = getEmissionStatus(FD); if (ES == Sema::FunctionEmissionStatus::Emitted || ES == Sema::FunctionEmissionStatus::Unknown) diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index aec33303780a0..776d6e55acc18 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -1122,8 +1122,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { } case DeclSpec::TST_int128: if (!S.Context.getTargetInfo().hasInt128Type() && - !(S.getLangOpts().SYCLIsDevice || S.getLangOpts().CUDAIsDevice || - (S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice))) + !(S.getLangOpts().isTargetDevice())) S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << "__int128"; if (DS.getTypeSpecSign() == TypeSpecifierSign::Unsigned) @@ -1168,8 +1167,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { break; case DeclSpec::TST_float128: if (!S.Context.getTargetInfo().hasFloat128Type() && - !S.getLangOpts().SYCLIsDevice && !S.getLangOpts().CUDAIsDevice && - !(S.getLangOpts().OpenMP && S.getLangOpts().OpenMPIsTargetDevice)) + !S.getLangOpts().isTargetDevice()) S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) << "__float128"; Result = Context.Float128Ty; @@ -8286,12 +8284,7 @@ static bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr, /// match one of the standard Neon vector types. static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, Sema &S, VectorKind VecKind) { - bool IsTargetCUDAAndHostARM = false; - if (S.getLangOpts().CUDAIsDevice) { - const TargetInfo *AuxTI = S.getASTContext().getAuxTargetInfo(); - IsTargetCUDAAndHostARM = - AuxTI && (AuxTI->getTriple().isAArch64() || AuxTI->getTriple().isARM()); - } + bool IsTargetOffloading = S.getLangOpts().isTargetDevice(); // Target must have NEON (or MVE, whose vectors are similar enough // not to need a separate attribute) @@ -8325,8 +8318,7 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, return; // Only certain element types are supported for Neon vectors. - if (!isPermittedNeonBaseType(CurType, VecKind, S) && - !IsTargetCUDAAndHostARM) { + if (!isPermittedNeonBaseType(CurType, VecKind, S) && !IsTargetOffloading) { S.Diag(Attr.getLoc(), diag::err_attribute_invalid_vector_type) << CurType; Attr.setInvalid(); return; diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp index 8d63d2c414cef..52dec2013a24f 100644 --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -512,7 +512,7 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles, const ArgList &Args) { CmdArgs.push_back(InputFile); // If this is CPU offloading we copy the input libraries. - if (!Triple.isAMDGPU() && !Triple.isNVPTX() && !Triple.isSPIRV()) { + if (!Triple.isGPU()) { CmdArgs.push_back("-Wl,-Bsymbolic"); CmdArgs.push_back("-shared"); ArgStringList LinkerArgs; diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 652b3d8795ab7..229695b18d278 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1139,22 +1139,16 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args, if (args.hasArg(clang::driver::options::OPT_no_offloadlib)) res.getLangOpts().NoGPULib = 1; } - - switch (llvm::Triple(res.getTargetOpts().triple).getArch()) { - case llvm::Triple::nvptx: - case llvm::Triple::nvptx64: - case llvm::Triple::amdgcn: + if (llvm::Triple(res.getTargetOpts().triple).isGPU()) { if (!res.getLangOpts().OpenMPIsTargetDevice) { const unsigned diagID = diags.getCustomDiagID( clang::DiagnosticsEngine::Error, - "OpenMP AMDGPU/NVPTX is only prepared to deal with device code."); + "OpenMP GPU is only prepared to deal with device code."); diags.Report(diagID); } res.getLangOpts().OpenMPIsGPU = 1; - break; - default: + } else { res.getLangOpts().OpenMPIsGPU = 0; - break; } // Get the OpenMP target triples if any. @@ -1176,10 +1170,8 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args, if (tt.getArch() == llvm::Triple::UnknownArch || !(tt.getArch() == llvm::Triple::aarch64 || tt.isPPC() || tt.getArch() == llvm::Triple::systemz || - tt.getArch() == llvm::Triple::nvptx || - tt.getArch() == llvm::Triple::nvptx64 || tt.isAMDGCN() || tt.getArch() == llvm::Triple::x86 || - tt.getArch() == llvm::Triple::x86_64)) + tt.getArch() == llvm::Triple::x86_64 || tt.isGPU())) diags.Report(clang::diag::err_drv_invalid_omp_target) << arg->getValue(i); else if (getArchPtrSize(t) != getArchPtrSize(tt)) diff --git a/flang/test/Lower/OpenMP/omp-is-gpu.f90 b/flang/test/Lower/OpenMP/omp-is-gpu.f90 index 3e6daeb522d77..77d347c9a9fde 100644 --- a/flang/test/Lower/OpenMP/omp-is-gpu.f90 +++ b/flang/test/Lower/OpenMP/omp-is-gpu.f90 @@ -12,5 +12,5 @@ subroutine omp_subroutine() end subroutine omp_subroutine -!FLANG-ERROR: error: OpenMP AMDGPU/NVPTX is only prepared to deal with device code. +!FLANG-ERROR: error: OpenMP GPU is only prepared to deal with device code. !BBC-ERROR: FATAL: -fopenmp-is-gpu can only be set if -fopenmp-is-target-device is also set diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h index da5b05632f2ec..fb6bbc0163701 100644 --- a/llvm/include/llvm/TargetParser/Triple.h +++ b/llvm/include/llvm/TargetParser/Triple.h @@ -1219,6 +1219,9 @@ class Triple { /// Test whether target triples are compatible. bool isCompatibleWith(const Triple &Other) const; + /// Test whether the target triple is for a GPU. + bool isGPU() const { return isSPIRV() || isNVPTX() || isAMDGPU(); } + /// Merge target triples. std::string merge(const Triple &Other) const; diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h index c2db8e32e7432..f82e169da00e3 100644 --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -1339,9 +1339,7 @@ struct InformationCache { bool stackIsAccessibleByOtherThreads() { return !targetIsGPU(); } /// Return true if the target is a GPU. - bool targetIsGPU() { - return TargetTriple.isAMDGPU() || TargetTriple.isNVPTX(); - } + bool targetIsGPU() { return TargetTriple.isGPU(); } /// Return all functions that might be called indirectly, only valid for /// closed world modules (see isClosedWorldModule). diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 6abfe4c244ca9..1e427ca63c5cf 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -439,7 +439,7 @@ std::string getPGOFuncNameVarName(StringRef FuncName, bool isGPUProfTarget(const Module &M) { const Triple &T = M.getTargetTriple(); - return T.isAMDGPU() || T.isNVPTX(); + return T.isGPU(); } void setPGOFuncVisibility(Module &M, GlobalVariable *FuncNameVar) { diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 9ab0ff58bb5ba..fe789c550a1bf 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -199,7 +199,7 @@ ChangeStatus &llvm::operator&=(ChangeStatus &L, ChangeStatus R) { bool AA::isGPU(const Module &M) { Triple T(M.getTargetTriple()); - return T.isAMDGPU() || T.isNVPTX(); + return T.isGPU(); } bool AA::isNoSyncInst(Attributor &A, const Instruction &I, @@ -3300,7 +3300,7 @@ InformationCache::getIndirectlyCallableFunctions(Attributor &A) const { } std::optional<unsigned> InformationCache::getFlatAddressSpace() const { - if (TargetTriple.isAMDGPU() || TargetTriple.isNVPTX()) + if (TargetTriple.isGPU()) return 0; return std::nullopt; } diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp index c5932f0d65ee1..ab5cdc08664d7 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp @@ -133,8 +133,7 @@ class SanitizerBinaryMetadata { VersionStr(utostr(getVersion())), IRB(M.getContext()) { // FIXME: Make it work with other formats. assert(TargetTriple.isOSBinFormatELF() && "ELF only"); - assert(!(TargetTriple.isNVPTX() || TargetTriple.isAMDGPU()) && - "Device targets are not supported"); + assert(!TargetTriple.isGPU() && "Device targets are not supported"); } bool run(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits