[llvm] [CodeGen] Remove unused functions (NFC) (PR #228844)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 00:18:47 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-regalloc

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

LiveVariables::replaceKillInstruction: The last caller was removed on
October 1, 2026 in commit 8068182dd6fb1a8efae0291db1d2462d29025cd1.

TargetLoweringBase::getSupportedLibcallImpl: The last caller was
removed on October 24, 2025 in commit
26450db480761c0fedf319fc350178798ce7e547.

Assisted-by: Antigravity


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


3 Files Affected:

- (modified) llvm/include/llvm/CodeGen/LiveVariables.h (-5) 
- (modified) llvm/include/llvm/CodeGen/TargetLowering.h (-6) 
- (modified) llvm/lib/CodeGen/LiveVariables.cpp (-8) 


``````````diff
diff --git a/llvm/include/llvm/CodeGen/LiveVariables.h b/llvm/include/llvm/CodeGen/LiveVariables.h
index c6e0c8419f35b6e..4b06c5b48335f5d 100644
--- a/llvm/include/llvm/CodeGen/LiveVariables.h
+++ b/llvm/include/llvm/CodeGen/LiveVariables.h
@@ -192,11 +192,6 @@ class LiveVariables {
   /// machine function to be in SSA form.
   LLVM_ABI void recomputeForSingleDefVirtReg(Register Reg);
 
-  /// replaceKillInstruction - Update register kill info by replacing a kill
-  /// instruction with a new one.
-  LLVM_ABI void replaceKillInstruction(Register Reg, MachineInstr &OldMI,
-                                       MachineInstr &NewMI);
-
   /// addVirtualRegisterKilled - Add information about the fact that the
   /// specified register is killed after being used by the specified
   /// instruction. If AddIfNotFound is true, add a implicit operand if it's
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index 91221f31b49a397..ab92757abeb66b4 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -3785,12 +3785,6 @@ class LLVM_ABI TargetLoweringBase {
 
   RTLIB::LibcallImpl getMemcpyImpl() const { return Libcalls.getMemcpyImpl(); }
 
-  /// Check if this is valid libcall for the current module, otherwise
-  /// RTLIB::Unsupported.
-  RTLIB::LibcallImpl getSupportedLibcallImpl(StringRef FuncName) const {
-    return RuntimeLibcallInfo.getSupportedLibcallImpl(FuncName);
-  }
-
   /// Get the CallingConv that should be used for the specified libcall
   /// implementation.
   CallingConv::ID getLibcallImplCallingConv(RTLIB::LibcallImpl Call) const {
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 1d6168618b75138..5ce12c481bf1611 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -729,14 +729,6 @@ void LiveVariables::recomputeForSingleDefVirtReg(Register Reg) {
   }
 }
 
-/// replaceKillInstruction - Update register kill info by replacing a kill
-/// instruction with a new one.
-void LiveVariables::replaceKillInstruction(Register Reg, MachineInstr &OldMI,
-                                           MachineInstr &NewMI) {
-  VarInfo &VI = getVarInfo(Reg);
-  llvm::replace(VI.Kills, &OldMI, &NewMI);
-}
-
 /// removeVirtualRegistersKilled - Remove all killed info for the specified
 /// instruction.
 void LiveVariables::removeVirtualRegistersKilled(MachineInstr &MI) {

``````````

</details>


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


More information about the llvm-commits mailing list