[NVPTX] Handle writeonly byval parameters after refactoring (a171b8d4d5231)
After the NVPTX refactoring in a171b8d4d5231, NVPTXLowerArgs unconditionally
adds grid_constant attribute to all byval parameters via createNVVMInternalAddrspaceWrap.
This causes issues with writeonly parameters (marked by SPIRV backend with
initializes attribute) that need to be written to for initialization.
The grid_constant attribute requires parameters to be read-only inputs in PTX
.param space, but writeonly parameters are outputs that must be written to.
This causes ptxas errors: "Illegal to write to function input parameter".
The fix ensures writeonly byval parameters:
1. Are forced to use copyByValParam (local memory copy) early in lowerKernelByValParam
2. Skip getting grid_constant/ReadOnly attributes in createNVVMInternalAddrspaceWrap
This allows writeonly parameters to be properly handled as outputs in local
memory where they can be written to, fixing compilation with -fsycl-use-spirv-backend-for-spirv-gen.
Fixes: structs_with_special_types_as_kernel_paramters.cpp test
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>