KhronosGroup / SPIRV-LLVM-Translator

A tool and a library for bi-directional translation between SPIR-V and LLVM IR
Other
468 stars 209 forks source link

Revert "Turn on SPIR-V builtin generation for OpenCL CPP sources (#2466)" #2508

Closed bwlodarcz closed 4 months ago

bwlodarcz commented 4 months ago

This reverts commit 80dfd864ae556369747074bbde8fc1d4c48547be. The commit breaks Translator in cases when user supplied function is named with the same prefix, after demangling, as OpenCL builtin. The culprit code is in SPIRWriter OCL pass in function OCLToSPIRVBase::visitCallInst(CallInst &). Failing name would be for example atomic_fetch_and_sub_uint32_explicit.

asudarsa commented 4 months ago

I am trying to check if this is a OpenCL C++ specific problem or if this issue can be reproduced in OpenCL C. Will revert once confirmed as a OpenCL C++ specific problem. Thanks

asudarsa commented 4 months ago

Hi @svenvh,

We tested my change https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/2512 and all our existing test failures are resolved. This particular change (OCLToSPIRV for OpenCL C++) is important for one of our compilation flows. I would prefer to keep this in and continue discussion about covering user-declared functions. Please let me know if that' acceptable.

Thanks

MrSidims commented 4 months ago

is important for one of our compilation flows

Can it be moved to downstream then?