[SPIR-V] Implement SPV_KHR_untyped_pointers extension (#201233)
Add support for SPV_KHR_untyped_pointers, which replaces typed
OpTypePointer with OpTypeUntypedPointerKHR for ordinary data pointers.
An untyped pointer no longer carries its pointee, so the element type
that used to live in the pointer type is now supplied per instruction:
the Data Type of OpUntypedVariableKHR, the Base Type of the
OpUntyped*AccessChainKHR family, the element size for async copy and
prefetch, and so on. These are taken from the element types the backend
already deduces for the typed path.
Pointers whose pointee has to keep its type stay typed even with the
extension enabled: opaque builtin types (images, samplers, pipes,
events), function pointers, and byval/byref/sret aggregate arguments.
The implementation targets the compute path for now.
The Shader/Vulkan path is not covered. This includes
OpUntypedArrayLengthKHR.
Assisted-by: Claude Code Opus 4.8