[llvm] r324977 - Revert "Document the shortcomings of DwarfExpression::addMachineReg()."

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 17:17:35 PST 2018


Author: adrian
Date: Mon Feb 12 17:17:35 2018
New Revision: 324977

URL: http://llvm.org/viewvc/llvm-project?rev=324977&view=rev
Log:
Revert "Document the shortcomings of DwarfExpression::addMachineReg()."

This reverts commit r324972. This commit broke a bot, so perhaps it is
testable after all?

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp?rev=324977&r1=324976&r2=324977&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Mon Feb 12 17:17:35 2018
@@ -123,10 +123,7 @@ bool DwarfExpression::addMachineReg(cons
   const TargetRegisterClass *RC = TRI.getMinimalPhysRegClass(MachineReg);
   unsigned RegSize = TRI.getRegSizeInBits(*RC);
   // Keep track of the bits in the register we already emitted, so we
-  // can avoid emitting redundant aliasing subregs. Because this is
-  // just doing a greedy scan of all subregisters, it is possible that
-  // this doesn't find a combination of subregisters that fully cover
-  // the register (even though one may exist).
+  // can avoid emitting redundant aliasing subregs.
   SmallBitVector Coverage(RegSize, false);
   for (MCSubRegIterator SR(MachineReg, &TRI); SR.isValid(); ++SR) {
     unsigned Idx = TRI.getSubRegIndex(MachineReg, *SR);
@@ -146,7 +143,7 @@ bool DwarfExpression::addMachineReg(cons
     if (CurSubReg.test(Coverage)) {
       // Emit a piece for any gap in the coverage.
       if (Offset > CurPos)
-        DwarfRegs.push_back({-1, Offset - CurPos, "no DWARF register encoding"});
+        DwarfRegs.push_back({-1, Offset - CurPos, nullptr});
       DwarfRegs.push_back(
           {Reg, std::min<unsigned>(Size, MaxSize - Offset), "sub-register"});
       if (Offset >= MaxSize)
@@ -157,8 +154,7 @@ bool DwarfExpression::addMachineReg(cons
       CurPos = Offset + Size;
     }
   }
-  if (CurPos < RegSize)
-    DwarfRegs.push_back({-1, RegSize - CurPos, "no DWARF register encoding"});
+
   return CurPos;
 }
 




More information about the llvm-commits mailing list