[llvm] e253382 - [MRI] Print more debug infor in clearVirtRegs() (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 07:43:06 PST 2022


Author: Nikita Popov
Date: 2022-12-15T16:42:56+01:00
New Revision: e253382cd34b2378d60b93274e3d5b3b0645b738

URL: https://github.com/llvm/llvm-project/commit/e253382cd34b2378d60b93274e3d5b3b0645b738
DIFF: https://github.com/llvm/llvm-project/commit/e253382cd34b2378d60b93274e3d5b3b0645b738.diff

LOG: [MRI] Print more debug infor in clearVirtRegs() (NFC)

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineRegisterInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index e48f1beaae2b..e322250460d5 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -204,7 +204,11 @@ void MachineRegisterInfo::clearVirtRegs() {
     if (!VRegInfo[Reg].second)
       continue;
     verifyUseList(Reg);
-    llvm_unreachable("Remaining virtual register operands");
+    errs() << "Remaining virtual register "
+           << printReg(Reg, getTargetRegisterInfo()) << "...\n";
+    for (MachineInstr &MI : reg_instructions(Reg))
+      errs() << "...in instruction: " << MI << "\n";
+    std::abort();
   }
 #endif
   VRegInfo.clear();


        


More information about the llvm-commits mailing list