Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/SPIRV/OCLToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,9 @@ bool OCLToSPIRVBase::runOCLToSPIRV(Module &Module) {
auto Src = getSPIRVSource(&Module);
// This is a pre-processing pass, which transform LLVM IR module to a more
// suitable form for the SPIR-V translation: it is specifically designed to
// handle OpenCL C/C++ and C++ for OpenCL modules and shouldn't be launched
// for other source languages.
if (std::get<0>(Src) != spv::SourceLanguageOpenCL_C &&
std::get<0>(Src) != spv::SourceLanguageOpenCL_CPP &&
std::get<0>(Src) != spv::SourceLanguageCPP_for_OpenCL)
// handle OpenCL C built-in functions and shouldn't be launched for other
// source languages
if (std::get<0>(Src) != spv::SourceLanguageOpenCL_C)
return false;

CLVer = std::get<1>(Src);
Expand Down
8 changes: 1 addition & 7 deletions lib/SPIRV/OCLTypeToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ bool OCLTypeToSPIRVBase::runOCLTypeToSPIRV(Module &Module) {
AdaptedTy.clear();
WorkSet.clear();
auto Src = getSPIRVSource(&Module);
// This is a pre-processing pass, which transform LLVM IR module to a more
// suitable form for the SPIR-V translation: it is specifically designed to
// handle OpenCL C/C++ and C++ for OpenCL types and shouldn't be launched for
// other source languages.
if (std::get<0>(Src) != spv::SourceLanguageOpenCL_C &&
std::get<0>(Src) != spv::SourceLanguageOpenCL_CPP &&
std::get<0>(Src) != spv::SourceLanguageCPP_for_OpenCL)
if (std::get<0>(Src) != spv::SourceLanguageOpenCL_C)
return false;

for (auto &F : Module.functions())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ attributes #5 = { nounwind }

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 1, i32 2}
!2 = !{i32 7, i32 100000}
!2 = !{i32 4, i32 100000}
!3 = !{!"clang version 11.0.0"}
!4 = !{}
!5 = !{!6, !6, i64 0}
Expand Down
27 changes: 0 additions & 27 deletions test/ocl_to_spirv_for_cpp_for_opencl.ll

This file was deleted.

27 changes: 0 additions & 27 deletions test/ocl_to_spirv_for_opencl_cpp.ll

This file was deleted.