This patch removes the -opaque-pointers=0 flag from all* the remaining tests. Some significant changes to the SPIRVGlobalRegistry, SPIRVDupliactesTracker, Intrinsics were necessary -- most notably the introduction of spv_assign_ptr_type intrinsic for tracking the underlying type of pointers.
*The following relevant tests are removed by this patch (they still require additional adjustments and fixes in the backend, will reland in subsequent patches):
- CodeGen/SPIRV/EnqueueEmptyKernel.ll
- CodeGen/SPIRV/OpenCL/basic/vstore_private.ll
- CodeGen/SPIRV/OpenCL/execute_block.ll
- CodeGen/SPIRV/half_no_extension.ll
- CodeGen/SPIRV/transcoding/BuildNDRange_2.ll
- CodeGen/SPIRV/transcoding/block_w_struct_return.ll
- CodeGen/SPIRV/transcoding/enqueue_kernel.ll
- CodeGen/SPIRV/transcoding/global_block.ll
In the upcoming week I will do best to recover the CTS testing pipeline. This requires generating of opaque IR (opaque pointers, target extension type, ...) from Intel Graphics Compiler based on LLVM 14. I expect the CTS pass rate to drop significantly.
In the meantime, I am preparing a patch dropping support for typed pointers (removing references to APIs), OpenCL/SPIR-V builtin opaque types, and any other "dead" parts of code. This patch will also partially tackle the issues discovered in the LITs from the list above and failing CTS tests.
There are still known issues which might be now easier to work on since we no longer need to support typed pointers:
- issues with lowering enqueue, ndrange builtins
- issues with lowering some structs in opaque pointer mode
- duplicate getOrCreateSPIRVPointerType methods in SPIRVGlobalRegistry
- opaque pointer handling in SPIRVDuplicatesTracker may require major redesign
I hope to discuss some of these issues during the SPIR-V Backend WG sync on Thursday.
Is it used inside SPIRVDuplicatesTracker?