Skip to content

[RegAlloc] Remove redundant prints of LiveInterval weight. #116451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Nov 15, 2024

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

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

llvmbot commented Nov 15, 2024

@llvm/pr-subscribers-llvm-regalloc

Author: Craig Topper (topperc)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/116451.diff

2 Files Affected:

  • (modified) llvm/lib/CodeGen/RegAllocBase.cpp (+1-1)
  • (modified) llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp (+1-1)
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;

@topperc topperc merged commit 131d73e into llvm:main Nov 16, 2024
10 checks passed
@topperc topperc deleted the pr/duplicate-weight-pint branch November 16, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants