[llvm] [RegAlloc] Remove redundant prints of LiveInterval weight. (PR #116451)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 15:47:19 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-regalloc
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
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
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/116451
More information about the llvm-commits
mailing list