Skip to content

Commit c383c6b

Browse files
committed
added TODO comments
1 parent d07251d commit c383c6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ static Error runAOTCompile(StringRef InputFile, StringRef OutputFile,
466466
return createStringError(inconvertibleErrorCode(), "Unsupported arch");
467467
}
468468

469+
// TODO: Consider using LLVM-IR metadata to identify globals of interest
469470
bool isKernel(const Function &F) {
470471
const CallingConv::ID CC = F.getCallingConv();
471472
return CC == CallingConv::SPIR_KERNEL || CC == CallingConv::AMDGPU_KERNEL ||
@@ -545,6 +546,12 @@ Error runSYCLLink(ArrayRef<std::string> Files, const ArgList &Args) {
545546
return createFileError(File, EC);
546547
}
547548
OffloadingImage TheImage{};
549+
// TODO: TheImageKind should be
550+
// `IsAOTCompileNeeded ? IMG_Object : IMG_SPIRV;`
551+
// For that we need to update SYCL Runtime to align with the ImageKind enum.
552+
// Temporarily it is initalized to IMG_None, because in that case, SYCL
553+
// Runtime has a heuristic to understand what the Image Kind is, so at least
554+
// it works.
548555
TheImage.TheImageKind = IMG_None;
549556
TheImage.TheOffloadKind = OFK_SYCL;
550557
TheImage.StringData["triple"] =

0 commit comments

Comments
 (0)