Skip to content

Commit 2d72003

Browse files
author
AGindinson
committed
Revert "[SYCL][FPGA] Restore legacy debug info version for the hardware (#3991)"
The underlying backend is now prepared to accept the ocl-100 version. This reverts commit 33bc8ad.
1 parent 95c0636 commit 2d72003

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
@@ -8723,11 +8723,7 @@ void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA,
87238723
TranslatorArgs.push_back(Output.getFilename());
87248724
if (JA.isDeviceOffloading(Action::OFK_SYCL)) {
87258725
TranslatorArgs.push_back("-spirv-max-version=1.3");
8726-
// TODO: align debug info for FPGA H/W when its SPIR-V consumer is ready
8727-
if (C.getDriver().isFPGAEmulationMode())
8728-
TranslatorArgs.push_back("-spirv-debug-info-version=ocl-100");
8729-
else
8730-
TranslatorArgs.push_back("-spirv-debug-info-version=legacy");
8726+
TranslatorArgs.push_back("-spirv-debug-info-version=ocl-100");
87318727
// Prevent crash in the translator if input IR contains DIExpression
87328728
// operations which don't have mapping to OpenCL.DebugInfo.100 spec.
87338729
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.3");
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
@@ -697,8 +697,7 @@
697697
// CHK-TOOLS-AOT: file-table-tform{{.*}} "-extract=Code" "-drop_titles" "-o" "[[OUTPUT2_1:.+\.txt]]" "[[OUTPUT2_T]]"
698698
// CHK-TOOLS-CPU: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.3" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
699699
// CHK-TOOLS-GEN: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.3" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
700-
// CHK-TOOLS-FPGA-HW: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.3" "-spirv-debug-info-version=legacy" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
701-
// CHK-TOOLS-FPGA-EMU: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.3" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
700+
// CHK-TOOLS-FPGA: llvm-spirv{{.*}} "-o" "[[OUTPUT3_T:.+\.txt]]" "-spirv-max-version=1.3" "-spirv-debug-info-version=ocl-100" "-spirv-allow-extra-diexpressions" "-spirv-allow-unknown-intrinsics=llvm.genx." {{.*}} "[[OUTPUT2_1]]"
702701
// CHK-TOOLS-FPGA-HW: aoc{{.*}} "-o" "[[OUTPUT4_T:.+\.aocx]]" "[[OUTPUT3_T]]"
703702
// CHK-TOOLS-FPGA-EMU: opencl-aot{{.*}} "-spv=[[OUTPUT3_T]]" "-ir=[[OUTPUT4_T:.+\.aocx]]"
704703
// CHK-TOOLS-GEN: ocloc{{.*}} "-output" "[[OUTPUT4_T:.+\.out]]" {{.*}} "[[OUTPUT3_T]]"

0 commit comments

Comments
 (0)