@@ -47,41 +47,6 @@ void SYCLInstallationDetector::print(llvm::raw_ostream &OS) const {
47
47
}
48
48
}
49
49
50
- const char *SYCL::Linker::constructLLVMSpirvCommand (
51
- Compilation &C, const JobAction &JA, const InputInfo &Output,
52
- StringRef OutputFilePrefix, bool ToBc, const char *InputFileName) const {
53
- // Construct llvm-spirv command.
54
- // The output is a bc file or vice versa depending on the -r option usage
55
- // llvm-spirv -r -o a_kernel.bc a_kernel.spv
56
- // llvm-spirv -o a_kernel.spv a_kernel.bc
57
- ArgStringList CmdArgs;
58
- const char *OutputFileName = nullptr ;
59
- if (ToBc) {
60
- std::string TmpName =
61
- C.getDriver ().GetTemporaryPath (OutputFilePrefix.str () + " -spirv" , " bc" );
62
- OutputFileName = C.addTempFile (C.getArgs ().MakeArgString (TmpName));
63
- CmdArgs.push_back (" -r" );
64
- CmdArgs.push_back (" -o" );
65
- CmdArgs.push_back (OutputFileName);
66
- } else {
67
- CmdArgs.push_back (" -spirv-max-version=1.4" );
68
- CmdArgs.push_back (" -spirv-ext=+all" );
69
- CmdArgs.push_back (" -spirv-debug-info-version=ocl-100" );
70
- CmdArgs.push_back (" -spirv-allow-extra-diexpressions" );
71
- CmdArgs.push_back (" -spirv-allow-unknown-intrinsics=llvm.genx." );
72
- CmdArgs.push_back (" -o" );
73
- CmdArgs.push_back (Output.getFilename ());
74
- }
75
- CmdArgs.push_back (InputFileName);
76
-
77
- SmallString<128 > LLVMSpirvPath (C.getDriver ().Dir );
78
- llvm::sys::path::append (LLVMSpirvPath, " llvm-spirv" );
79
- const char *LLVMSpirv = C.getArgs ().MakeArgString (LLVMSpirvPath);
80
- C.addCommand (std::make_unique<Command>(
81
- JA, *this , ResponseFileSupport::AtFileUTF8 (), LLVMSpirv, CmdArgs, None));
82
- return OutputFileName;
83
- }
84
-
85
50
static void addFPGATimingDiagnostic (std::unique_ptr<Command> &Cmd,
86
51
Compilation &C) {
87
52
const char *Msg = C.getArgs ().MakeArgString (
@@ -343,22 +308,11 @@ void SYCL::Linker::ConstructJob(Compilation &C, const JobAction &JA,
343
308
return ;
344
309
}
345
310
346
- // We want to use llvm-spirv linker to link spirv binaries before putting
347
- // them into the fat object.
348
- // Each command outputs different files.
349
311
InputInfoList SpirvInputs;
350
312
for (const auto &II : Inputs) {
351
313
if (!II.isFilename ())
352
314
continue ;
353
- if (!Args.getLastArgValue (options::OPT_fsycl_device_obj_EQ)
354
- .equals_insensitive (" spirv" ))
355
- SpirvInputs.push_back (II);
356
- else {
357
- const char *LLVMSpirvOutputFile = constructLLVMSpirvCommand (
358
- C, JA, Output, Prefix, true , II.getFilename ());
359
- SpirvInputs.push_back (InputInfo (types::TY_LLVM_BC, LLVMSpirvOutputFile,
360
- LLVMSpirvOutputFile));
361
- }
315
+ SpirvInputs.push_back (II);
362
316
}
363
317
364
318
constructLLVMLinkCommand (C, JA, Output, Args, SubArchName, Prefix,
0 commit comments