[llvm] 517caca - GlobalISel: Improve dead instruction debug printing

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 07:12:24 PDT 2020


Author: Matt Arsenault
Date: 2020-08-24T10:12:00-04:00
New Revision: 517caca359e027ba6e88b8531ef072084204cc2d

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

LOG: GlobalISel: Improve dead instruction debug printing

This was printing the "Is dead" on a separate line from the
instruction, which was harder to follow.

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/Legalizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
index 1d7be54de3b0..5ba9367cac8a 100644
--- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
@@ -284,7 +284,7 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
                                             WrapperObserver)) {
         WorkListObserver.printNewInstrs();
         for (auto *DeadMI : DeadInstructions) {
-          LLVM_DEBUG(dbgs() << *DeadMI << "Is dead\n");
+          LLVM_DEBUG(dbgs() << "Is dead: " << *DeadMI);
           RemoveDeadInstFromLists(DeadMI);
           DeadMI->eraseFromParentAndMarkDBGValuesForRemoval();
         }


        


More information about the llvm-commits mailing list