[llvm-branch-commits] [llvm] [NVPTX] add support for encoding PTX registers for DWARF (PR #109495)
William G Hatch via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 23 12:27:01 PDT 2024
================
@@ -141,3 +142,47 @@ NVPTXRegisterInfo::getFrameLocalRegister(const MachineFunction &MF) const {
static_cast<const NVPTXTargetMachine &>(MF.getTarget());
return TM.is64Bit() ? NVPTX::VRFrameLocal64 : NVPTX::VRFrameLocal32;
}
+
+void NVPTXRegisterInfo::clearDebugRegisterMap() const {
+ debugRegisterMap.clear();
+}
+
+static uint64_t encodeRegisterForDwarf(std::string registerName) {
+ if (registerName.length() > 8) {
+ // The name is more than 8 characters long, and so won't fit into 64 bits.
+ return 0;
+ }
----------------
willghatch wrote:
I believe that the longest register name prefix in use is 4 characters, leaving 4 more characters for the decimal number, meaning 10k registers. So it could just be an error, and probably should. 10k registers ought to be enough for anyone.
https://github.com/llvm/llvm-project/pull/109495
More information about the llvm-branch-commits
mailing list