[llvm] [Transforms] Remove dead declarations (PR #217829)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 00:09:05 PDT 2026


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/217829

reportOrPersistProfileStats: Added on March 28, 2024 in commit
1d99d7a6f841de594b38936a4a73866b23a8b105 without a corresponding
function definition.

optimizeStrNCpy: The corresponding function definition was removed on
September 27, 2022 in commit e80e134c77bb093370a3e4fee41ebe8710e3564d.


>From 04fd7c82e559c73d66a1f75d832aec952292f305 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 13 Aug 2026 10:12:45 -0700
Subject: [PATCH] [Transforms] Remove dead declarations

reportOrPersistProfileStats: Added on March 28, 2024 in commit
1d99d7a6f841de594b38936a4a73866b23a8b105 without a corresponding
function definition.

optimizeStrNCpy: The corresponding function definition was removed on
September 27, 2022 in commit e80e134c77bb093370a3e4fee41ebe8710e3564d.
---
 llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h | 1 -
 llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h b/llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
index 6d52d804ac67c..2ae83dab5bcfd 100644
--- a/llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
+++ b/llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
@@ -233,7 +233,6 @@ class SampleProfileMatcher {
   // Match orphan IR functions to unused top-level profile entries by demangled
   // basename, without requiring a matched caller in the call graph.
   void matchFunctionsWithoutProfileByBasename();
-  void reportOrPersistProfileStats();
 };
 } // end namespace llvm
 #endif // LLVM_TRANSFORMS_IPO_SAMPLEPROFILEMATCHER_H
diff --git a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index 5bdac325b5659..7298ad459a5da 100644
--- a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -169,7 +169,6 @@ class LibCallSimplifier {
   Value *optimizeStrCpy(CallInst *CI, IRBuilderBase &B);
   Value *optimizeStpCpy(CallInst *CI, IRBuilderBase &B);
   Value *optimizeStrLCpy(CallInst *CI, IRBuilderBase &B);
-  Value *optimizeStrNCpy(CallInst *CI, IRBuilderBase &B);
   Value *optimizeStrLen(CallInst *CI, IRBuilderBase &B);
   Value *optimizeStrNLen(CallInst *CI, IRBuilderBase &B);
   Value *optimizeStrPBrk(CallInst *CI, IRBuilderBase &B);



More information about the llvm-commits mailing list