[llvm] e00d67d - [NFC] Reflow some debug messages.

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 02:12:02 PDT 2021


Author: David Green
Date: 2021-07-27T10:11:51+01:00
New Revision: e00d67dc48be26cc9fc4958c3b2d5149eb5ec230

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

LOG: [NFC] Reflow some debug messages.

Added: 
    

Modified: 
    llvm/lib/CodeGen/DetectDeadLanes.cpp
    llvm/lib/CodeGen/HardwareLoops.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/DetectDeadLanes.cpp b/llvm/lib/CodeGen/DetectDeadLanes.cpp
index 03fe5f155291a..1337e57f360bb 100644
--- a/llvm/lib/CodeGen/DetectDeadLanes.cpp
+++ b/llvm/lib/CodeGen/DetectDeadLanes.cpp
@@ -516,15 +516,17 @@ bool DetectDeadLanes::runOnce(MachineFunction &MF) {
       transferDefinedLanesStep(MO, Info.DefinedLanes);
   }
 
-  LLVM_DEBUG(dbgs() << "Defined/Used lanes:\n"; for (unsigned RegIdx = 0;
-                                                     RegIdx < NumVirtRegs;
-                                                     ++RegIdx) {
-    unsigned Reg = Register::index2VirtReg(RegIdx);
-    const VRegInfo &Info = VRegInfos[RegIdx];
-    dbgs() << printReg(Reg, nullptr)
-           << " Used: " << PrintLaneMask(Info.UsedLanes)
-           << " Def: " << PrintLaneMask(Info.DefinedLanes) << '\n';
-  } dbgs() << "\n";);
+  LLVM_DEBUG({
+    dbgs() << "Defined/Used lanes:\n";
+    for (unsigned RegIdx = 0; RegIdx < NumVirtRegs; ++RegIdx) {
+      unsigned Reg = Register::index2VirtReg(RegIdx);
+      const VRegInfo &Info = VRegInfos[RegIdx];
+      dbgs() << printReg(Reg, nullptr)
+             << " Used: " << PrintLaneMask(Info.UsedLanes)
+             << " Def: " << PrintLaneMask(Info.DefinedLanes) << '\n';
+    }
+    dbgs() << "\n";
+  });
 
   bool Again = false;
   // Mark operands as dead/unused.

diff  --git a/llvm/lib/CodeGen/HardwareLoops.cpp b/llvm/lib/CodeGen/HardwareLoops.cpp
index 8cb04a13fd623..4316034371a58 100644
--- a/llvm/lib/CodeGen/HardwareLoops.cpp
+++ b/llvm/lib/CodeGen/HardwareLoops.cpp
@@ -406,8 +406,8 @@ Value *HardwareLoop::InitLoopCount() {
   }
 
   if (!isSafeToExpandAt(TripCount, BB->getTerminator(), SE)) {
-    LLVM_DEBUG(dbgs() << "- Bailing, unsafe to expand TripCount "
-               << *TripCount << "\n");
+    LLVM_DEBUG(dbgs() << "- Bailing, unsafe to expand TripCount " << *TripCount
+                      << "\n");
     return nullptr;
   }
 
@@ -424,9 +424,9 @@ Value *HardwareLoop::InitLoopCount() {
   UseLoopGuard = UseLoopGuard && CanGenerateTest(L, Count);
   BeginBB = UseLoopGuard ? BB : L->getLoopPreheader();
   LLVM_DEBUG(dbgs() << " - Loop Count: " << *Count << "\n"
-             << " - Expanded Count in " << BB->getName() << "\n"
-             << " - Will insert set counter intrinsic into: "
-             << BeginBB->getName() << "\n");
+                    << " - Expanded Count in " << BB->getName() << "\n"
+                    << " - Will insert set counter intrinsic into: "
+                    << BeginBB->getName() << "\n");
   return Count;
 }
 


        


More information about the llvm-commits mailing list