[llvm] r245768 - AMDGPU: Improve debug printing in SIFixSGPRLiveRanges

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 17:19:25 PDT 2015


Author: arsenm
Date: Fri Aug 21 19:19:25 2015
New Revision: 245768

URL: http://llvm.org/viewvc/llvm-project?rev=245768&view=rev
Log:
AMDGPU: Improve debug printing in SIFixSGPRLiveRanges

Modified:
    llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp?rev=245768&r1=245767&r2=245768&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp Fri Aug 21 19:19:25 2015
@@ -181,16 +181,25 @@ bool SIFixSGPRLiveRanges::runOnMachineFu
       bool LiveInToA = LIS->isLiveInToMBB(*LR, SuccA);
       bool LiveInToB = LIS->isLiveInToMBB(*LR, SuccB);
 
-      if ((!LiveInToA && !LiveInToB) ||
-          (LiveInToA && LiveInToB))
+      if (!LiveInToA && !LiveInToB) {
+        DEBUG(dbgs() << PrintReg(Reg, TRI, 0)
+              << " is live into neither successor\n");
         continue;
+      }
+
+      if (LiveInToA && LiveInToB) {
+        DEBUG(dbgs() << PrintReg(Reg, TRI, 0)
+              << " is live into both successors\n");
+        continue;
+      }
 
       // This interval is live in to one successor, but not the other, so
       // we need to update its range so it is live in to both.
-      DEBUG(dbgs() << "Possible SGPR conflict detected " <<  " in " << *LR <<
-                      " BB#" << SuccA->getNumber() << ", BB#" <<
-                      SuccB->getNumber() <<
-                      " with NCD = " << NCD->getNumber() << '\n');
+      DEBUG(dbgs() << "Possible SGPR conflict detected for "
+            << PrintReg(Reg, TRI, 0) <<  " in " << *LR
+            << " BB#" << SuccA->getNumber() << ", BB#"
+            << SuccB->getNumber()
+            << " with NCD = BB#" << NCD->getNumber() << '\n');
 
       assert(TargetRegisterInfo::isVirtualRegister(Reg) &&
              "Not expecting to extend live range of physreg");




More information about the llvm-commits mailing list