[PATCH] D93139: Make debug dump more friendly to conditional debug compilation

Gaurav Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 11:59:09 PST 2020


gjain created this revision.
gjain added reviewers: mtrofin, dsanders, qcolombet.
Herald added subscribers: hiraditya, MatzeB.
gjain requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93139

Files:
  llvm/lib/CodeGen/RegAllocFast.cpp
  llvm/lib/CodeGen/RegAllocGreedy.cpp
  llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp


Index: llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
+++ llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
@@ -328,7 +328,7 @@
   LiveIntervals &LIs = G.getMetadata().LIS;
 
   TRI = MF.getSubtarget().getRegisterInfo();
-  LLVM_DEBUG(MF.dump());
+  LLVM_DEBUG(MF.print(dbgs()));
 
   for (const auto &MBB: MF) {
     Chains.clear(); // FIXME: really needed ? Could not work at MF level ?
Index: llvm/lib/CodeGen/RegAllocGreedy.cpp
===================================================================
--- llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -3245,7 +3245,7 @@
 
   VRAI->calculateSpillWeightsAndHints();
 
-  LLVM_DEBUG(LIS->dump());
+  LLVM_DEBUG(LIS->print(dbgs()));
 
   SA.reset(new SplitAnalysis(*VRM, *LIS, *Loops));
   SE.reset(new SplitEditor(*SA, *AA, *LIS, *VRM, *DomTree, *MBFI));
Index: llvm/lib/CodeGen/RegAllocFast.cpp
===================================================================
--- llvm/lib/CodeGen/RegAllocFast.cpp
+++ llvm/lib/CodeGen/RegAllocFast.cpp
@@ -1442,7 +1442,7 @@
   }
   DanglingDbgValues.clear();
 
-  LLVM_DEBUG(MBB.dump());
+  LLVM_DEBUG(MBB.print(dbgs()));
 }
 
 bool RegAllocFast::runOnMachineFunction(MachineFunction &MF) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93139.311297.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201211/39b39cc7/attachment.bin>


More information about the llvm-commits mailing list