[AMDGPU] Replace constant uses of LDS variables in the object linking mode (#248503)
In the object linking mode, `AMDGPULowerModuleLDS` moves an LDS variable
into a struct and replaces the uses of the variable in instructions. A
use outside instructions, for example in the initializer of a table in
global memory, kept the old variable as an LDS definition next to the
struct. Code that read the address from the table then used another
location than the instructions, and `AMDGPUAsmPrinter` stopped at the
assertion for LDS definitions.
The LDS lowering for ASan (`AMDGPUSwLowerLDS`) makes such a table for
the LDS slot of each kernel. So in object linking mode, ASan code
crashed when a non-kernel function used LDS.
Since the linker does the allocation in object linking mode, the
remaining uses now get the same field of the struct, after the variables
are removed from the used lists.
This PR was assisted by AI but I reviewed all the changes.