[llvm] [StackColoring] Delete dead stack slots (PR #72633)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 13:53:01 PST 2023


================
@@ -899,6 +899,13 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) {
   unsigned FixedMemOp = 0;
   unsigned FixedDbg = 0;
 
+  // Remove debug information for deleted slots.
+  erase_if(MF->getVariableDbgInfo(), [&](auto &VI) {
+    int Slot = VI.getStackSlot();
----------------
nikic wrote:

Doesn't this need an inStackSlot() check? VariableDbgInfo can also hold a register.

https://github.com/llvm/llvm-project/pull/72633


More information about the llvm-commits mailing list