[llvm] 7b776ee - [Transforms] Remove unused replaceDbgUsesWithUndef (#218215)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 23 08:08:11 PDT 2026
Author: Kazu Hirata
Date: 2026-08-23T08:08:06-07:00
New Revision: 7b776ee89aa802fa603ab8868441cbc42d6c9691
URL: https://github.com/llvm/llvm-project/commit/7b776ee89aa802fa603ab8868441cbc42d6c9691
DIFF: https://github.com/llvm/llvm-project/commit/7b776ee89aa802fa603ab8868441cbc42d6c9691.diff
LOG: [Transforms] Remove unused replaceDbgUsesWithUndef (#218215)
The last use was removed on Mar 5, 2026 in
commit e3b62ffcd8592cf234174057b4581adb1eecbf9c.
Added:
Modified:
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/Utils/Local.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/Local.h b/llvm/include/llvm/Transforms/Utils/Local.h
index f07b2f0ba3bdd..4644ca15a946e 100644
--- a/llvm/include/llvm/Transforms/Utils/Local.h
+++ b/llvm/include/llvm/Transforms/Utils/Local.h
@@ -144,12 +144,6 @@ LLVM_ABI bool
SimplifyInstructionsInBlock(BasicBlock *BB,
const TargetLibraryInfo *TLI = nullptr);
-/// Replace all the uses of an SSA value in @llvm.dbg intrinsics with
-/// undef. This is useful for signaling that a variable, e.g. has been
-/// found dead and hence it's unavailable at a given program point.
-/// Returns true if the dbg values have been changed.
-LLVM_ABI bool replaceDbgUsesWithUndef(Instruction *I);
-
//===----------------------------------------------------------------------===//
// Control Flow Graph Restructuring.
//
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index f5d2d0aadd7c8..29bd7c4dba51e 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -609,14 +609,6 @@ void llvm::RecursivelyDeleteTriviallyDeadInstructions(
}
}
-bool llvm::replaceDbgUsesWithUndef(Instruction *I) {
- SmallVector<DbgVariableRecord *, 1> DPUsers;
- findDbgUsers(I, DPUsers);
- for (auto *DVR : DPUsers)
- DVR->setKillLocation();
- return !DPUsers.empty();
-}
-
/// areAllUsesEqual - Check whether the uses of a value are all the same.
/// This is similar to Instruction::hasOneUse() except this will also return
/// true when there are no uses or multiple uses that all refer to the same
More information about the llvm-commits
mailing list