[llvm] [CodeGen]RegisterCoalescer: Remove the print() method (PR #125042)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 02:59:24 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-regalloc

Author: Akshat Oke (optimisan)

<details>
<summary>Changes</summary>

I saw that there used to be an overload `operator<<(OS, const Pass &P)`.

Now that it's gone, I still don't find anyone using the print method except the internal debug printing hidden under `LLVM_DEBUG` in this function.



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


1 Files Affected:

- (modified) llvm/lib/CodeGen/RegisterCoalescer.cpp (+1-8) 


``````````diff
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 62c15949e46dac..d2f7684ec83a48 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -390,9 +390,6 @@ class RegisterCoalescer : public MachineFunctionPass,
 
   /// This is the pass entry point.
   bool runOnMachineFunction(MachineFunction &) override;
-
-  /// Implement the dump method.
-  void print(raw_ostream &O, const Module * = nullptr) const override;
 };
 
 } // end anonymous namespace
@@ -4344,12 +4341,8 @@ bool RegisterCoalescer::runOnMachineFunction(MachineFunction &fn) {
   PHIValToPos.clear();
   RegToPHIIdx.clear();
 
-  LLVM_DEBUG(dump());
+  LLVM_DEBUG(LIS->dump());
   if (VerifyCoalescing)
     MF->verify(this, "After register coalescing", &errs());
   return true;
 }
-
-void RegisterCoalescer::print(raw_ostream &O, const Module *m) const {
-  LIS->print(O);
-}

``````````

</details>


https://github.com/llvm/llvm-project/pull/125042


More information about the llvm-commits mailing list