Skip to content

Commit bcbaa50

Browse files
author
Artem Gindinson
authored
Revert "[SYCL][FPGA] Restore legacy debug info version for the hardware (#3991)" (#4562)
The underlying backend is now prepared to accept the ocl-100 version. This reverts commit 33bc8ad.
1 parent b61e7cb commit bcbaa50

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8718,11 +8718,7 @@ void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA,
87188718
TranslatorArgs.push_back(Output.getFilename());
87198719
if (JA.isDeviceOffloading(Action::OFK_SYCL)) {
87208720
TranslatorArgs.push_back("-spirv-max-version=1.4");
8721-
// TODO: align debug info for FPGA H/W when its SPIR-V consumer is ready
8722-
if (C.getDriver().isFPGAEmulationMode())
8723-
TranslatorArgs.push_back("-spirv-debug-info-version=ocl-100");
8724-
else
8725-
TranslatorArgs.push_back("-spirv-debug-info-version=legacy");
8721+
TranslatorArgs.push_back("-spirv-debug-info-version=ocl-100");
87268722
// Prevent crash in the translator if input IR contains DIExpression
87278723
// operations which don't have mapping to OpenCL.DebugInfo.100 spec.
87288724
TranslatorArgs.push_back("-spirv-allow-extra-diexpressions");

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ const char *SYCL::Linker::constructLLVMSpirvCommand(
6666
} else {
6767
CmdArgs.push_back("-spirv-max-version=1.4");
6868
CmdArgs.push_back("-spirv-ext=+all");
69-
if (!C.getDriver().isFPGAEmulationMode())
70-
CmdArgs.push_back("-spirv-debug-info-version=legacy");
71-
else
72-
CmdArgs.push_back("-spirv-debug-info-version=ocl-100");
69+
CmdArgs.push_back("-spirv-debug-info-version=ocl-100");
7370
CmdArgs.push_back("-spirv-allow-extra-diexpressions");
7471
CmdArgs.push_back("-spirv-allow-unknown-intrinsics=llvm.genx.");
7572
CmdArgs.push_back("-o");

clang/test/Driver/sycl-offload.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,7 @@
704704
// CHK-TOOLS-AOT: file-table-tform{{.*}} "-extract=Code" "-drop_titles" "-o" "[[OUTPUT2_1:.+\.txt]]" "[[OUTPUT2_T]]"
705705
// CHK-TOOLS-CPU: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.4" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
706706
// CHK-TOOLS-GEN: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.4" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
707-
// CHK-TOOLS-FPGA-HW: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.4" "-spirv-debug-info-version=legacy" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
708-
// CHK-TOOLS-FPGA-EMU: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.4" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
707+
// CHK-TOOLS-FPGA: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.4" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
709708
// CHK-TOOLS-FPGA-HW: aoc{{.*}} "-o" "[[OUTPUT4_T:.+\.aocx]]" "[[OUTPUT3_T]]"
710709
// CHK-TOOLS-FPGA-EMU: opencl-aot{{.*}} "-spv=[[OUTPUT3_T]]" "-ir=[[OUTPUT4_T:.+\.aocx]]"
711710
// CHK-TOOLS-GEN: ocloc{{.*}} "-output" "[[OUTPUT4_T:.+\.out]]" {{.*}} "[[OUTPUT3_T]]"

0 commit comments

Comments
 (0)