[PATCH] D43427: [RegAllocFast] Salvage debug values when killing operands (WIP)

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 12:53:49 PST 2018


vsk added a comment.

@aprantl thanks for the feedback, I'll take a look at whether MachineRegisterInfo is the right place for generic register allocator helpers to live.

A side note: I won't get back to this patch for a few days, as I need to take a look at Swift bugs.



================
Comment at: lib/CodeGen/MachineRegisterInfo.cpp:578
+    });
+    VRegCallback(SrcVReg, DstVReg);
   }
----------------
Note: This probably shouldn't be called unless we've actually updated any uses.


================
Comment at: lib/CodeGen/RegAllocFast.cpp:705
+    auto DbgUses = DbgUsesIt->second;
+    LiveDbgValueMap[DstVReg].append(DbgUses.begin(), DbgUses.end());
+  }
----------------
I think this should be:
```
auto &DbgUses = ...;
LiveDbgValueMap[DstVReg].append(DbgUses.begin(), DbgUses.end());
DbgUses.clear();
```
I still need to figure out how to get test coverage for this.


https://reviews.llvm.org/D43427





More information about the llvm-commits mailing list