Skip to content

Commit 1342360

Browse files
authored
[Driver][SYCL] Enable adding of default device triple (#4175)
Add the default device triple (spir64) when we encounter any incoming objects or libraries that have been previously built with the spir64 target. The use of -fno-sycl-link-spirv has been added to disable this behavior.
1 parent 2af5e6c commit 1342360

File tree

10 files changed

+198
-27
lines changed

10 files changed

+198
-27
lines changed

clang/include/clang/Driver/Driver.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,21 @@ class Driver {
655655
FPGAEmulationMode = IsEmulation;
656656
}
657657

658+
/// The inclusion of the default SYCL device triple is dependent on either
659+
/// the discovery of an existing object/archive that contains the device code
660+
/// or if a user explicitly turns this on with -fsycl-add-spirv.
661+
/// We need to keep track of this so any use of any generic target option
662+
/// setting is only applied to the user specified triples.
663+
bool SYCLDefaultTripleImplied = false;
664+
void setSYCLDefaultTriple(bool IsDefaultImplied) {
665+
SYCLDefaultTripleImplied = IsDefaultImplied;
666+
}
667+
668+
/// Returns true if an offload binary is found that contains the default
669+
/// triple for SYCL (spir64)
670+
bool checkForSYCLDefaultDevice(Compilation &C,
671+
llvm::opt::DerivedArgList &Args) const;
672+
658673
/// Returns true if an offload static library is found.
659674
bool checkForOffloadStaticLib(Compilation &C,
660675
llvm::opt::DerivedArgList &Args) const;
@@ -714,6 +729,10 @@ class Driver {
714729
/// FPGA Emulation. This is only used for SYCL offloading to FPGA device.
715730
bool isFPGAEmulationMode() const { return FPGAEmulationMode; };
716731

732+
/// isSYCLDefaultTripleImplied - The default SYCL triple (spir64) has been
733+
/// added or should be added given proper criteria.
734+
bool isSYCLDefaultTripleImplied() const { return SYCLDefaultTripleImplied; };
735+
717736
/// addIntegrationFiles - Add the integration files that will be populated
718737
/// by the device compilation and used by the host compile.
719738
void addIntegrationFiles(StringRef IntHeaderName, StringRef IntFooterName,

clang/include/clang/Driver/Options.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,6 +2644,9 @@ def fno_sycl_use_footer : Flag<["-"], "fno-sycl-use-footer">, Flags<[CoreOption]
26442644
def fsycl_footer_path_EQ : Joined<["-"], "fsycl-footer-path=">,
26452645
Flags<[CoreOption]>, HelpText<"Specify the location of the temporary "
26462646
"source file with the included integration footer.">;
2647+
def fno_sycl_link_spirv : Flag<["-"], "fno-sycl-link-spirv">,
2648+
Flags<[CoreOption]>, HelpText<"Disable adding of the default (spir64) triple "
2649+
"when discovered in user specified objects and archives.">;
26472650
def fsyntax_only : Flag<["-"], "fsyntax-only">,
26482651
Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group<Action_Group>;
26492652
def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;

clang/lib/Driver/Driver.cpp

Lines changed: 79 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,23 @@ static bool isValidSYCLTriple(llvm::Triple T) {
718718
return true;
719719
}
720720

721+
static void addSYCLDefaultTriple(Compilation &C,
722+
SmallVectorImpl<llvm::Triple> &SYCLTriples) {
723+
if (!C.getDriver().isSYCLDefaultTripleImplied())
724+
return;
725+
for (const auto &SYCLTriple : SYCLTriples) {
726+
if (SYCLTriple.getSubArch() == llvm::Triple::NoSubArch &&
727+
SYCLTriple.isSPIR())
728+
return;
729+
// If we encounter a known non-spir* target, do not add the default triple.
730+
if (SYCLTriple.isNVPTX() || SYCLTriple.isAMDGCN())
731+
return;
732+
}
733+
// Add the default triple as it was not found.
734+
llvm::Triple DefaultTriple = C.getDriver().MakeSYCLDeviceTriple("spir64");
735+
SYCLTriples.insert(SYCLTriples.begin(), DefaultTriple);
736+
}
737+
721738
void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
722739
InputList &Inputs) {
723740

@@ -929,6 +946,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
929946
FoundNormalizedTriples[NormalizedName] = Val;
930947
UniqueSYCLTriplesVec.push_back(TT);
931948
}
949+
addSYCLDefaultTriple(C, UniqueSYCLTriplesVec);
932950
} else
933951
Diag(clang::diag::warn_drv_empty_joined_argument)
934952
<< SYCLTargetsValues->getAsString(C.getInputArgs());
@@ -987,8 +1005,10 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
9871005
else if (HasValidSYCLRuntime)
9881006
// Triple for -fintelfpga is spir64_fpga-unknown-unknown-sycldevice.
9891007
SYCLTargetArch = SYCLfpga ? "spir64_fpga" : "spir64";
990-
if (!SYCLTargetArch.empty())
1008+
if (!SYCLTargetArch.empty()) {
9911009
UniqueSYCLTriplesVec.push_back(MakeSYCLDeviceTriple(SYCLTargetArch));
1010+
addSYCLDefaultTriple(C, UniqueSYCLTriplesVec);
1011+
}
9921012
}
9931013
// We'll need to use the SYCL and host triples as the key into
9941014
// getOffloadingDeviceToolChain, because the device toolchains we're
@@ -1418,6 +1438,11 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
14181438
if (checkForOffloadStaticLib(*C, *TranslatedArgs))
14191439
setOffloadStaticLibSeen();
14201440

1441+
// Check for any objects/archives that need to be compiled with the default
1442+
// triple.
1443+
if (checkForSYCLDefaultDevice(*C, *TranslatedArgs))
1444+
setSYCLDefaultTriple(true);
1445+
14211446
// Populate the tool chains for the offloading devices, if any.
14221447
CreateOffloadingDeviceToolChains(*C, Inputs);
14231448

@@ -1428,7 +1453,8 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
14281453
const ToolChain *TC = SYCLTCRange.first->second;
14291454
const toolchains::SYCLToolChain *SYCLTC =
14301455
static_cast<const toolchains::SYCLToolChain *>(TC);
1431-
SYCLTC->TranslateBackendTargetArgs(*TranslatedArgs, TargetArgs);
1456+
SYCLTC->TranslateBackendTargetArgs(SYCLTC->getTriple(), *TranslatedArgs,
1457+
TargetArgs);
14321458
for (StringRef ArgString : TargetArgs) {
14331459
if (ArgString.equals("-hardware") || ArgString.equals("-simulation")) {
14341460
setFPGAEmulationMode(false);
@@ -2762,6 +2788,30 @@ bool hasFPGABinary(Compilation &C, std::string Object, types::ID Type) {
27622788
return runBundler(BundlerArgs, C);
27632789
}
27642790

2791+
static bool hasSYCLDefaultSection(Compilation &C, const StringRef &File) {
2792+
// Do not do the check if the file doesn't exist
2793+
if (!llvm::sys::fs::exists(File))
2794+
return false;
2795+
2796+
bool IsArchive = isStaticArchiveFile(File);
2797+
if (!(IsArchive || isObjectFile(File.str())))
2798+
return false;
2799+
2800+
llvm::Triple TT(C.getDriver().MakeSYCLDeviceTriple("spir64"));
2801+
// Checking uses -check-section option with the input file, no output
2802+
// file and the target triple being looked for.
2803+
const char *Targets =
2804+
C.getArgs().MakeArgString(Twine("-targets=sycl-") + TT.str());
2805+
const char *Inputs =
2806+
C.getArgs().MakeArgString(Twine("-inputs=") + File.str());
2807+
// Always use -type=ao for bundle checking. The 'bundles' are
2808+
// actually archives.
2809+
SmallVector<StringRef, 6> BundlerArgs = {"clang-offload-bundler",
2810+
IsArchive ? "-type=ao" : "-type=o",
2811+
Targets, Inputs, "-check-section"};
2812+
return runBundler(BundlerArgs, C);
2813+
}
2814+
27652815
static bool hasOffloadSections(Compilation &C, const StringRef &Archive,
27662816
DerivedArgList &Args) {
27672817
// Do not do the check if the file doesn't exist
@@ -2792,14 +2842,15 @@ static bool optionMatches(const std::string &Option,
27922842
// Process linker inputs for use with offload static libraries. We are only
27932843
// handling options and explicitly named static archives as these need to be
27942844
// partially linked.
2795-
static SmallVector<const char *, 16> getLinkerArgs(Compilation &C,
2796-
DerivedArgList &Args) {
2845+
static SmallVector<const char *, 16>
2846+
getLinkerArgs(Compilation &C, DerivedArgList &Args, bool IncludeObj = false) {
27972847
SmallVector<const char *, 16> LibArgs;
27982848
for (const auto *A : Args) {
27992849
std::string FileName = A->getAsString(Args);
28002850
if (A->getOption().getKind() == Option::InputClass) {
28012851
StringRef Value(A->getValue());
2802-
if (isStaticArchiveFile(Value)) {
2852+
if (isStaticArchiveFile(Value) ||
2853+
(IncludeObj && isObjectFile(Value.str()))) {
28032854
LibArgs.push_back(Args.MakeArgString(FileName));
28042855
continue;
28052856
}
@@ -2818,7 +2869,7 @@ static SmallVector<const char *, 16> getLinkerArgs(Compilation &C,
28182869
// Only add named static libs objects and --whole-archive options.
28192870
if (optionMatches("-whole-archive", V.str()) ||
28202871
optionMatches("-no-whole-archive", V.str()) ||
2821-
isStaticArchiveFile(V)) {
2872+
isStaticArchiveFile(V) || (IncludeObj && isObjectFile(V.str()))) {
28222873
LibArgs.push_back(Args.MakeArgString(V));
28232874
return;
28242875
}
@@ -2884,6 +2935,26 @@ static bool IsSYCLDeviceLibObj(std::string ObjFilePath, bool isMSVCEnv) {
28842935
return Ret;
28852936
}
28862937

2938+
// Goes through all of the arguments, including inputs expected for the
2939+
// linker directly, to determine if we need to potentially add the SYCL
2940+
// default triple.
2941+
bool Driver::checkForSYCLDefaultDevice(Compilation &C,
2942+
DerivedArgList &Args) const {
2943+
// Check only if enabled with -fsycl
2944+
if (!Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false))
2945+
return false;
2946+
2947+
if (Args.hasArg(options::OPT_fno_sycl_link_spirv))
2948+
return false;
2949+
2950+
SmallVector<const char *, 16> AllArgs(getLinkerArgs(C, Args, true));
2951+
for (StringRef Arg : AllArgs) {
2952+
if (hasSYCLDefaultSection(C, Arg))
2953+
return true;
2954+
}
2955+
return false;
2956+
}
2957+
28872958
// Goes through all of the arguments, including inputs expected for the
28882959
// linker directly, to determine if we need to perform additional work for
28892960
// static offload libraries.
@@ -4657,6 +4728,7 @@ class OffloadingActionBuilder final {
46574728
if (TT.getSubArch() == llvm::Triple::SPIRSubArch_fpga)
46584729
SYCLfpgaTriple = true;
46594730
}
4731+
addSYCLDefaultTriple(C, SYCLTripleList);
46604732
}
46614733
if (SYCLAddTargets) {
46624734
for (StringRef Val : SYCLAddTargets->getValues()) {
@@ -4679,6 +4751,7 @@ class OffloadingActionBuilder final {
46794751
const char *SYCLTargetArch = SYCLfpga ? "spir64_fpga" : "spir64";
46804752
SYCLTripleList.push_back(
46814753
C.getDriver().MakeSYCLDeviceTriple(SYCLTargetArch));
4754+
addSYCLDefaultTriple(C, SYCLTripleList);
46824755
if (SYCLfpga)
46834756
SYCLfpgaTriple = true;
46844757
}

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8274,6 +8274,8 @@ void OffloadBundler::ConstructJobMultipleOutputs(
82748274
if (getToolChain().getTriple().getSubArch() ==
82758275
llvm::Triple::SPIRSubArch_fpga &&
82768276
Dep.DependentOffloadKind == Action::OFK_SYCL) {
8277+
if (J++)
8278+
Triples += ',';
82778279
llvm::Triple TT;
82788280
TT.setArchName(types::getTypeName(InputType));
82798281
TT.setVendorName("intel");
@@ -8284,6 +8286,8 @@ void OffloadBundler::ConstructJobMultipleOutputs(
82848286
} else if (getToolChain().getTriple().getSubArch() !=
82858287
llvm::Triple::SPIRSubArch_fpga &&
82868288
Dep.DependentOffloadKind == Action::OFK_Host) {
8289+
if (J++)
8290+
Triples += ',';
82878291
Triples += Action::GetOffloadKindName(Dep.DependentOffloadKind);
82888292
Triples += '-';
82898293
Triples += Dep.DependentToolChain->getTriple().normalize();
@@ -8443,10 +8447,10 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
84438447
// Only store compile/link opts in the image descriptor for the SPIR-V
84448448
// target; AOT compilation has already been performed otherwise.
84458449
TC.AddImpliedTargetArgs(TT, TCArgs, BuildArgs);
8446-
TC.TranslateBackendTargetArgs(TCArgs, BuildArgs);
8450+
TC.TranslateBackendTargetArgs(TT, TCArgs, BuildArgs);
84478451
createArgString("-compile-opts=");
84488452
BuildArgs.clear();
8449-
TC.TranslateLinkerTargetArgs(TCArgs, BuildArgs);
8453+
TC.TranslateLinkerTargetArgs(TT, TCArgs, BuildArgs);
84508454
createArgString("-link-opts=");
84518455
}
84528456

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ void SYCL::fpga::BackendCompiler::constructOpenCLAOTCommand(
387387
llvm::Triple CPUTriple("spir64_x86_64");
388388
TC.AddImpliedTargetArgs(CPUTriple, Args, CmdArgs);
389389
// Add the target args passed in
390-
TC.TranslateBackendTargetArgs(Args, CmdArgs);
391-
TC.TranslateLinkerTargetArgs(Args, CmdArgs);
390+
TC.TranslateBackendTargetArgs(CPUTriple, Args, CmdArgs);
391+
TC.TranslateLinkerTargetArgs(CPUTriple, Args, CmdArgs);
392392

393393
SmallString<128> ExecPath(
394394
getToolChain().GetProgramPath(makeExeName(C, "opencl-aot")));
@@ -414,7 +414,7 @@ void SYCL::fpga::BackendCompiler::ConstructJob(
414414
const toolchains::SYCLToolChain &TC =
415415
static_cast<const toolchains::SYCLToolChain &>(getToolChain());
416416
ArgStringList TargetArgs;
417-
TC.TranslateBackendTargetArgs(Args, TargetArgs);
417+
TC.TranslateBackendTargetArgs(TC.getTriple(), Args, TargetArgs);
418418

419419
// When performing emulation compilations for FPGA AOT, we want to use
420420
// opencl-aot instead of aoc.
@@ -534,8 +534,8 @@ void SYCL::fpga::BackendCompiler::ConstructJob(
534534
TC.AddImpliedTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
535535

536536
// Add -Xsycl-target* options.
537-
TC.TranslateBackendTargetArgs(Args, CmdArgs);
538-
TC.TranslateLinkerTargetArgs(Args, CmdArgs);
537+
TC.TranslateBackendTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
538+
TC.TranslateLinkerTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
539539

540540
// Look for -reuse-exe=XX option
541541
if (Arg *A = Args.getLastArg(options::OPT_reuse_exe_EQ)) {
@@ -581,8 +581,8 @@ void SYCL::gen::BackendCompiler::ConstructJob(Compilation &C,
581581
const toolchains::SYCLToolChain &TC =
582582
static_cast<const toolchains::SYCLToolChain &>(getToolChain());
583583
TC.AddImpliedTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
584-
TC.TranslateBackendTargetArgs(Args, CmdArgs);
585-
TC.TranslateLinkerTargetArgs(Args, CmdArgs);
584+
TC.TranslateBackendTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
585+
TC.TranslateLinkerTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
586586
SmallString<128> ExecPath(
587587
getToolChain().GetProgramPath(makeExeName(C, "ocloc")));
588588
const char *Exec = C.getArgs().MakeArgString(ExecPath);
@@ -614,8 +614,8 @@ void SYCL::x86_64::BackendCompiler::ConstructJob(
614614
static_cast<const toolchains::SYCLToolChain &>(getToolChain());
615615

616616
TC.AddImpliedTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
617-
TC.TranslateBackendTargetArgs(Args, CmdArgs);
618-
TC.TranslateLinkerTargetArgs(Args, CmdArgs);
617+
TC.TranslateBackendTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
618+
TC.TranslateLinkerTargetArgs(getToolChain().getTriple(), Args, CmdArgs);
619619
SmallString<128> ExecPath(
620620
getToolChain().GetProgramPath(makeExeName(C, "opencl-aot")));
621621
const char *Exec = C.getArgs().MakeArgString(ExecPath);
@@ -765,7 +765,8 @@ void SYCLToolChain::AddImpliedTargetArgs(
765765
}
766766

767767
void SYCLToolChain::TranslateBackendTargetArgs(
768-
const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const {
768+
const llvm::Triple &Triple, const llvm::opt::ArgList &Args,
769+
llvm::opt::ArgStringList &CmdArgs) const {
769770
// Handle -Xs flags.
770771
for (auto *A : Args) {
771772
// When parsing the target args, the -Xs<opt> type option applies to all
@@ -775,6 +776,15 @@ void SYCLToolChain::TranslateBackendTargetArgs(
775776
// -Xs "-DFOO -DBAR"
776777
// -XsDFOO -XsDBAR
777778
// All of the above examples will pass -DFOO -DBAR to the backend compiler.
779+
780+
// Do not add the -Xs to the default SYCL triple (spir64) when we know we
781+
// have implied the setting.
782+
if ((A->getOption().matches(options::OPT_Xs) ||
783+
A->getOption().matches(options::OPT_Xs_separate)) &&
784+
Triple.getSubArch() == llvm::Triple::NoSubArch && Triple.isSPIR() &&
785+
getDriver().isSYCLDefaultTripleImplied())
786+
continue;
787+
778788
if (A->getOption().matches(options::OPT_Xs)) {
779789
// Take the arg and create an option out of it.
780790
CmdArgs.push_back(Args.MakeArgString(Twine("-") + A->getValue()));
@@ -788,13 +798,22 @@ void SYCLToolChain::TranslateBackendTargetArgs(
788798
continue;
789799
}
790800
}
801+
// Do not process -Xsycl-target-backend for implied spir64
802+
if (Triple.getSubArch() == llvm::Triple::NoSubArch && Triple.isSPIR() &&
803+
getDriver().isSYCLDefaultTripleImplied())
804+
return;
791805
// Handle -Xsycl-target-backend.
792806
TranslateTargetOpt(Args, CmdArgs, options::OPT_Xsycl_backend,
793807
options::OPT_Xsycl_backend_EQ);
794808
}
795809

796810
void SYCLToolChain::TranslateLinkerTargetArgs(
797-
const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const {
811+
const llvm::Triple &Triple, const llvm::opt::ArgList &Args,
812+
llvm::opt::ArgStringList &CmdArgs) const {
813+
// Do not process -Xsycl-target-linker for implied spir64
814+
if (Triple.getSubArch() == llvm::Triple::NoSubArch && Triple.isSPIR() &&
815+
getDriver().isSYCLDefaultTripleImplied())
816+
return;
798817
// Handle -Xsycl-target-linker.
799818
TranslateTargetOpt(Args, CmdArgs, options::OPT_Xsycl_linker,
800819
options::OPT_Xsycl_linker_EQ);

clang/lib/Driver/ToolChains/SYCL.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,12 @@ class LLVM_LIBRARY_VISIBILITY SYCLToolChain : public ToolChain {
151151
void AddImpliedTargetArgs(const llvm::Triple &Triple,
152152
const llvm::opt::ArgList &Args,
153153
llvm::opt::ArgStringList &CmdArgs) const;
154-
void TranslateBackendTargetArgs(const llvm::opt::ArgList &Args,
155-
llvm::opt::ArgStringList &CmdArgs) const;
156-
void TranslateLinkerTargetArgs(const llvm::opt::ArgList &Args,
157-
llvm::opt::ArgStringList &CmdArgs) const;
154+
void TranslateBackendTargetArgs(const llvm::Triple &Triple,
155+
const llvm::opt::ArgList &Args,
156+
llvm::opt::ArgStringList &CmdArgs) const;
157+
void TranslateLinkerTargetArgs(const llvm::Triple &Triple,
158+
const llvm::opt::ArgList &Args,
159+
llvm::opt::ArgStringList &CmdArgs) const;
158160

159161
bool useIntegratedAs() const override { return true; }
160162
bool isPICDefault() const override { return false; }

clang/test/Driver/sycl-intelfpga-aoco-win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: echo "void foo() {}" > %t.c
44
// RUN: echo "void foo2() {}" > %t2.c
55
// RUN: %clang -target x86_64-pc-windows-msvc -c -o %t.o %t.c
6-
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -c -o %t2.o %t2.c
6+
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -fintelfpga -c -o %t2.o %t2.c
77
// RUN: clang-offload-wrapper -o %t-aoco.bc -host=x86_64-pc-windows-msvc -kind=sycl -target=fpga_aoco-intel-unknown-sycldevice %t.aoco
88
// RUN: llc -filetype=obj -o %t-aoco.o %t-aoco.bc
99
// RUN: llvm-ar crv %t_aoco.a %t.o %t2.o %t-aoco.o

clang/test/Driver/sycl-intelfpga-aoco.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// RUN: echo "void foo() {}" > %t.c
66
// RUN: echo "void foo2() {}" > %t2.c
77
// RUN: %clang -c -o %t.o %t.c
8-
// RUN: %clang -fsycl -c -o %t2.o %t2.c
9-
// RUN: %clang_cl -fsycl -c -o %t2_cl.o %t2.c
8+
// RUN: %clang -fsycl -fintelfpga -c -o %t2.o %t2.c
9+
// RUN: %clang_cl -fsycl -fintelfpga -c -o %t2_cl.o %t2.c
1010
// RUN: clang-offload-wrapper -o %t-aoco.bc -host=x86_64-unknown-linux-gnu -kind=sycl -target=fpga_aoco-intel-unknown-sycldevice %t.aoco
1111
// RUN: llc -filetype=obj -o %t-aoco.o %t-aoco.bc
1212
// RUN: clang-offload-wrapper -o %t-aoco_cl.bc -host=x86_64-unknown-linux-gnu -kind=sycl -target=fpga_aoco-intel-unknown-sycldevice %t.aoco

clang/test/Driver/sycl-offload-intelfpga.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
// RUN: | FileCheck -check-prefixes=CHK-FPGA-LINK,CHK-FPGA-IMAGE %s
4747
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice -fsycl-link=image -Xshardware %t.o -o libfoo.a 2>&1 \
4848
// RUN: | FileCheck -check-prefixes=CHK-FPGA-LINK,CHK-FPGA-IMAGE %s
49-
// CHK-FPGA-LINK-NOT: clang-offload-bundler{{.*}} "-check-section"
5049
// CHK-FPGA-LINK: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64_fpga-unknown-unknown-sycldevice" "-inputs=[[INPUT:.+\.o]]" "-outputs=[[OUTPUT1:.+\.o]]" "-unbundle"
5150
// CHK-FPGA-LINK-NOT: clang-offload-bundler{{.*}}
5251
// CHK-FPGA-LINK: llvm-link{{.*}} "[[OUTPUT1]]" "-o" "[[OUTPUT2_1:.+\.bc]]"

0 commit comments

Comments
 (0)