[llvm] 131d73e - [RegAlloc] Remove redundant prints of LiveInterval weight. (#116451)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 16:43:33 PST 2024


Author: Craig Topper
Date: 2024-11-15T16:43:30-08:00
New Revision: 131d73ed3483f2ad43a2c7c0834522c0150936bb

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

LOG: [RegAlloc] Remove redundant prints of LiveInterval weight. (#116451)

LiveInterval::print has included the weight since early 2018. We don't
need to print again after we print the interval.

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegAllocBase.cpp
    llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp
index 60deb62bc908ad..449033d6321003 100644
--- a/llvm/lib/CodeGen/RegAllocBase.cpp
+++ b/llvm/lib/CodeGen/RegAllocBase.cpp
@@ -105,7 +105,7 @@ void RegAllocBase::allocatePhysRegs() {
     // result from splitting.
     LLVM_DEBUG(dbgs() << "\nselectOrSplit "
                       << TRI->getRegClassName(MRI->getRegClass(VirtReg->reg()))
-                      << ':' << *VirtReg << " w=" << VirtReg->weight() << '\n');
+                      << ':' << *VirtReg << '\n');
 
     using VirtRegVec = SmallVector<Register, 4>;
 

diff  --git a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
index a1dccc4d59723b..a1f441ebd0d5e4 100644
--- a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+++ b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
@@ -157,7 +157,7 @@ bool DefaultEvictionAdvisor::shouldEvict(const LiveInterval &A, bool IsHint,
     return true;
 
   if (A.weight() > B.weight()) {
-    LLVM_DEBUG(dbgs() << "should evict: " << B << " w= " << B.weight() << '\n');
+    LLVM_DEBUG(dbgs() << "should evict: " << B << '\n');
     return true;
   }
   return false;


        


More information about the llvm-commits mailing list