@@ -1101,8 +1101,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
11011101 if (JA.isDeviceOffloading (Action::OFK_OpenMP) &&
11021102 !Args.hasArg (options::OPT_nostdinc) &&
11031103 !Args.hasArg (options::OPT_nogpuinc) &&
1104- (getToolChain ().getTriple ().isNVPTX () ||
1105- getToolChain ().getTriple ().isAMDGCN ())) {
1104+ getToolChain ().getTriple ().isGPU ()) {
11061105 if (!Args.hasArg (options::OPT_nobuiltininc)) {
11071106 // Add openmp_wrappers/* to our system include path. This lets us wrap
11081107 // standard library headers.
@@ -1289,8 +1288,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
12891288 // Without an offloading language we will include these headers directly.
12901289 // Offloading languages will instead only use the declarations stored in
12911290 // the resource directory at clang/lib/Headers/llvm_libc_wrappers.
1292- if ((getToolChain ().getTriple ().isNVPTX () ||
1293- getToolChain ().getTriple ().isAMDGCN ()) &&
1291+ if (getToolChain ().getTriple ().isGPU () &&
12941292 C.getActiveOffloadKinds () == Action::OFK_None) {
12951293 SmallString<128 > P (llvm::sys::path::parent_path (D.Dir ));
12961294 llvm::sys::path::append (P, " include" );
@@ -6388,10 +6386,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
63886386 Args.AddLastArg (CmdArgs, options::OPT_fconvergent_functions,
63896387 options::OPT_fno_convergent_functions);
63906388
6391- // NVPTX/AMDGCN doesn 't support PGO or coverage. There's no runtime support
6389+ // GPUs don 't support PGO or coverage. There's no runtime support
63926390 // for sampling, overhead of call arc collection is way too high and there's
63936391 // no way to collect the output.
6394- if (!Triple.isNVPTX () && !Triple. isAMDGCN ())
6392+ if (!Triple.isGPU ())
63956393 addPGOAndCoverageFlags (TC, C, JA, Output, Args, SanitizeArgs, CmdArgs);
63966394
63976395 Args.AddLastArg (CmdArgs, options::OPT_fclang_abi_compat_EQ);
0 commit comments