[PATCH] D88976: [clang] Use correct address space for global variable debug info

Scott Linder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 09:14:09 PDT 2020


scott.linder added a comment.

I'm not certain I fully understand NVPTX's relationship with its debugger, but from https://reviews.llvm.org/D57162 I gather the "default" address space in the debugger is global, and so the frontend omits it rather than explicitly mentioning it. I think it would be simpler to carry this information throughout the compiler, and only strip it late in the backend as a quirk controllable via some "optimize for NVPTX debugger", but in the patch as it currently is I instead just update `NVPTXDWARFAddrSpaceMap`.

I'm also not addressing the same issue with locals/autos. I left a "FIXME" in the new HIP test, and I wanted to ask if anyone can help me understand why the target address space isn't "available" at this point. I.e. with `LangAS::Default` we really want to notice at this point that the target address space is actually private for AMDGPU. The frontend does emit an alloca with the correct target address space, but I think this is via some static "alloca address space" mechanism? Is this a reasonable thing to use in `CGDebugInfo` too?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88976/new/

https://reviews.llvm.org/D88976



More information about the cfe-commits mailing list