|
1 | | -//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.cpp - SYCL linker util --=// |
| 1 | +//=-------- clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util -------=// |
2 | 2 | // |
3 | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | 4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | 6 | // |
7 | 7 | //===---------------------------------------------------------------------===// |
8 | 8 | // |
9 | | -// This tool wraps around the sequence of steps required to link device code in |
10 | | -// SYCL fat objects. SYCL device code linking requires a complex sequence of |
11 | | -// steps that include linking of llvm bitcode files, linking device library |
12 | | -// files with the fully linked source bitcode file(s), running several SYCL |
13 | | -// specific post-link steps on the fully linked bitcode file(s), and finally |
14 | | -// generating target-specific device code. This tool can be removed once SYCL |
15 | | -// linking is ported to `ld.lld`. |
16 | | -// |
| 9 | +// This tool executes a sequence of steps required to link device code in SYCL |
| 10 | +// fat objects. SYCL device code linking requires a complex sequence of steps |
| 11 | +// that include linking of llvm bitcode files, linking device library files |
| 12 | +// with the fully linked source bitcode file(s), running several SYCL specific |
| 13 | +// post-link steps on the fully linked bitcode file(s), and finally generating |
| 14 | +// target-specific device code. |
17 | 15 | //===---------------------------------------------------------------------===// |
18 | 16 |
|
19 | 17 | #include "clang/Basic/Version.h" |
@@ -69,7 +67,7 @@ static StringRef OutputFile; |
69 | 67 | static SmallString<128> SPIRVDumpDir; |
70 | 68 |
|
71 | 69 | static void printVersion(raw_ostream &OS) { |
72 | | - OS << clang::getClangToolFullVersion("clang-sycl-link-wrapper") << '\n'; |
| 70 | + OS << clang::getClangToolFullVersion("clang-sycl-linker") << '\n'; |
73 | 71 | } |
74 | 72 |
|
75 | 73 | /// The value of `argv[0]` when run. |
@@ -213,9 +211,8 @@ Expected<SmallVector<std::string>> getInput(const ArgList &Args) { |
213 | 211 | /// Link all SYCL device input files into one before adding device library |
214 | 212 | /// files. Device linking is performed using llvm-link tool. |
215 | 213 | /// 'InputFiles' is the list of all LLVM IR device input files. |
216 | | -/// 'Args' encompasses all arguments required for linking and wrapping device |
217 | | -/// code and will be parsed to generate options required to be passed into the |
218 | | -/// llvm-link tool. |
| 214 | +/// 'Args' encompasses all arguments required for linking device code and will |
| 215 | +/// be parsed to generate options required to be passed into llvm-link. |
219 | 216 | Expected<StringRef> linkDeviceInputFiles(ArrayRef<std::string> InputFiles, |
220 | 217 | const ArgList &Args) { |
221 | 218 | llvm::TimeTraceScope TimeScope("SYCL LinkDeviceInputFiles"); |
@@ -285,9 +282,8 @@ Expected<SmallVector<std::string>> getSYCLDeviceLibFiles(const ArgList &Args) { |
285 | 282 | /// Link all device library files and input file into one LLVM IR file. This |
286 | 283 | /// linking is performed using llvm-link tool. |
287 | 284 | /// 'InputFiles' is the list of all LLVM IR device input files. |
288 | | -/// 'Args' encompasses all arguments required for linking and wrapping device |
289 | | -/// code and will be parsed to generate options required to be passed into the |
290 | | -/// llvm-link tool. |
| 285 | +/// 'Args' encompasses all arguments required for linking device code and will |
| 286 | +/// be parsed to generate options required to be passed into llvm-link tool. |
291 | 287 | static Expected<StringRef> linkDeviceLibFiles(StringRef InputFile, |
292 | 288 | const ArgList &Args) { |
293 | 289 | llvm::TimeTraceScope TimeScope("LinkDeviceLibraryFiles"); |
@@ -391,9 +387,8 @@ static void getSPIRVTransOpts(const ArgList &Args, |
391 | 387 |
|
392 | 388 | /// Run LLVM to SPIR-V translation. |
393 | 389 | /// Converts 'File' from LLVM bitcode to SPIR-V format using llvm-spirv tool. |
394 | | -/// 'Args' encompasses all arguments required for linking and wrapping device |
395 | | -/// code and will be parsed to generate options required to be passed into the |
396 | | -/// llvm-spirv tool. |
| 390 | +/// 'Args' encompasses all arguments required for linking device code and will |
| 391 | +/// be parsed to generate options required to be passed into llvm-spirv tool. |
397 | 392 | static Expected<StringRef> runLLVMToSPIRVTranslation(StringRef File, |
398 | 393 | const ArgList &Args) { |
399 | 394 | llvm::TimeTraceScope TimeScope("LLVMToSPIRVTranslation"); |
@@ -478,7 +473,7 @@ int main(int argc, char **argv) { |
478 | 473 | if (Args.hasArg(OPT_help) || Args.hasArg(OPT_help_hidden)) { |
479 | 474 | Tbl.printHelp( |
480 | 475 | outs(), |
481 | | - "clang-sycl-link-wrapper [options] <options to sycl link steps>", |
| 476 | + "clang-sycl-linker [options] <options to sycl link steps>", |
482 | 477 | "A utility that wraps around several steps required to link SYCL " |
483 | 478 | "device files.\n" |
484 | 479 | "This enables LLVM IR linking, post-linking and code generation for " |
|
0 commit comments