]> granicus.if.org Git - clang/commit
[DEBUG_INFO][NVPTX] Generate correct data about variable address class.
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 5 Feb 2019 19:45:57 +0000 (19:45 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 5 Feb 2019 19:45:57 +0000 (19:45 +0000)
commitcac247a1b8e26061360cefa7e0d782807850d2fc
tree561bb82b74ae70dc475e8f28c5c5c4305e936d5f
parentc92286b1279f47c9427631cdf9a455ec191ef0b7
[DEBUG_INFO][NVPTX] Generate correct data about variable address class.

Summary:
Added ability to generate correct debug info data about the variable
address class. Currently, for all the locals and globals the default
values are used, ADDR_local_space(6) for locals and ADDR_global_space(5)
for globals. The values are taken from the table in
  https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf.
  We need to emit correct data for address classes of, at least, shared
  and constant globals. Currently, all these variables are treated by
  the cuda-gdb debugger as the variables in the global address space
  and, thus, it require manual data type casting.

Reviewers: echristo, probinson

Subscribers: jholewinski, aprantl, cfe-commits

Differential Revision: https://reviews.llvm.org/D57162

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353204 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets/NVPTX.h
lib/CodeGen/CGDebugInfo.cpp
test/CodeGenCUDA/debug-info-address-class.cu [new file with mode: 0644]