[llvm] [DebugInfo] Remove intrinsic-flavours of findDbgUsers (PR #149816)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 06:48:28 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/IR/DebugInfo.h llvm/include/llvm/Transforms/Utils/Local.h llvm/lib/CodeGen/CodeGenPrepare.cpp llvm/lib/IR/DebugInfo.cpp llvm/lib/IR/Value.cpp llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp llvm/lib/Transforms/Coroutines/CoroFrame.cpp llvm/lib/Transforms/Coroutines/SpillUtils.cpp llvm/lib/Transforms/InstCombine/InstructionCombining.cpp llvm/lib/Transforms/Scalar/ConstraintElimination.cpp llvm/lib/Transforms/Scalar/JumpThreading.cpp llvm/lib/Transforms/Scalar/NewGVN.cpp llvm/lib/Transforms/Utils/CodeExtractor.cpp llvm/lib/Transforms/Utils/LCSSA.cpp llvm/lib/Transforms/Utils/Local.cpp llvm/lib/Transforms/Utils/LoopRotationUtils.cpp llvm/lib/Transforms/Utils/MemoryOpRemark.cpp llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp llvm/lib/Transforms/Utils/SSAUpdater.cpp llvm/unittests/IR/DebugInfoTest.cpp llvm/unittests/Transforms/Utils/LocalTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h
index 00f664848..c529a8630 100644
--- a/llvm/include/llvm/IR/DebugInfo.h
+++ b/llvm/include/llvm/IR/DebugInfo.h
@@ -46,11 +46,13 @@ LLVM_ABI TinyPtrVector<DbgVariableRecord *> findDVRDeclares(Value *V);
LLVM_ABI TinyPtrVector<DbgVariableRecord *> findDVRValues(Value *V);
/// Finds the debug info records describing a value.
-LLVM_ABI void findDbgUsers(Value *V,
- SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords);
+LLVM_ABI void
+findDbgUsers(Value *V,
+ SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords);
/// Finds the dbg.values describing a value.
-LLVM_ABI void findDbgValues(Value *V,
- SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords);
+LLVM_ABI void
+findDbgValues(Value *V,
+ SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords);
/// Find subprogram that is enclosing this scope.
LLVM_ABI DISubprogram *getDISubprogram(const MDNode *Scope);
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 857174ed6..3a55375c8 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -122,13 +122,13 @@ findDbgIntrinsics(Value *V,
}
}
-void llvm::findDbgValues(Value *V,
- SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords) {
+void llvm::findDbgValues(
+ Value *V, SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords) {
findDbgIntrinsics</*DbgAssignAndValuesOnly=*/true>(V, DbgVariableRecords);
}
-void llvm::findDbgUsers(Value *V,
- SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords) {
+void llvm::findDbgUsers(
+ Value *V, SmallVectorImpl<DbgVariableRecord *> &DbgVariableRecords) {
findDbgIntrinsics</*DbgAssignAndValuesOnly=*/false>(V, DbgVariableRecords);
}
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 441434194..1e3ef68a5 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2036,8 +2036,8 @@ template <typename T> static void salvageDbgAssignAddress(T *Assign) {
}
}
-void llvm::salvageDebugInfoForDbgValues(
- Instruction &I, ArrayRef<DbgVariableRecord *> DPUsers) {
+void llvm::salvageDebugInfoForDbgValues(Instruction &I,
+ ArrayRef<DbgVariableRecord *> DPUsers) {
// These are arbitrary chosen limits on the maximum number of values and the
// maximum size of a debug expression we can salvage up to, used for
// performance reasons.
``````````
</details>
https://github.com/llvm/llvm-project/pull/149816
More information about the llvm-commits
mailing list