How can I see which variables are held in registers and how many registers they use?

I am compiling my CUDA program using nvcc with the --ptxas-options = -v option, and found that the register usage is significantly higher than I expected. Is there any way I can know specifically which variable uses how many registers? Thank you!

you can see a register “liveness” view using the binary tools:

[url]https://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#nvdisasm-usage[/url]