1f44ace8c5
SWDEV-81805 - Fix compiler lib bug: incorrect type name %opencl.pipe_t0 is generated when using clang.
Clang does not return llvm::Module. It saves the bitcode to a memory buffer and passed back to compiler lib, then bitcode reader is used to get llvm::Module. Clang and bitcode reader uses the same LLVMContext which is created earlier in aclCompileInternal. Since named struct types are shared between modules in LLVMContext. When bitcode reader loads the module, name collision happens for named struct types, which causes them to be postfixed with a number, e.g. %opencl.pipe_t => %opencl.pipe_t0.
This causes failure in SPIR-V drop-in conformance test.
The fix is to let clang uses a separate LLVMContext.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/frontend_clang.cpp#26 edit
[ROCm/clr commit: 56ea6c56a1]