[llvm] b650778 - [NFC] Wrap entire assert-only block in LLVM_DEBUG

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 04:02:28 PDT 2021


Author: Jordan Rupprecht
Date: 2021-06-21T04:01:27-07:00
New Revision: b650778dc4acbab8a5415e743604a2a0afabea3d

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

LOG: [NFC] Wrap entire assert-only block in LLVM_DEBUG

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
index 8e8d4bff672f..7beef25794b1 100644
--- a/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
+++ b/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
@@ -161,10 +161,12 @@ void SIOptimizeVGPRLiveRange::collectElseRegionBlocks(
       MBB = nullptr;
   }
 
-  LLVM_DEBUG(dbgs() << "Found Else blocks: ");
-  for (auto *MBB : Blocks)
-    LLVM_DEBUG(dbgs() << printMBBReference(*MBB) << ' ');
-  LLVM_DEBUG(dbgs() << '\n');
+  LLVM_DEBUG({
+    dbgs() << "Found Else blocks: ";
+    for (auto *MBB : Blocks)
+      dbgs() << printMBBReference(*MBB) << ' ';
+    dbgs() << '\n';
+  });
 }
 
 /// Find the instructions(excluding phi) in \p MBB that uses the \p Reg.


        


More information about the llvm-commits mailing list