https://github.com/artempyanykh updated https://github.com/llvm/llvm-project/pull/129152
>From 2688088875876985128f1e25d8a8d6e6e38ff0bc Mon Sep 17 00:00:00 2001 From: Artem Pianykh <a...@fb.com> Date: Tue, 25 Feb 2025 13:02:37 -0800 Subject: [PATCH] [NFC][Cloning] Remove now unused CollectDebugInfoForCloning Summary: This function is no longer used, let's remove it from the header and impl. Test Plan: ninja check-llvm-unit stack-info: PR: https://github.com/llvm/llvm-project/pull/129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10 --- llvm/include/llvm/Transforms/Utils/Cloning.h | 14 ------------- llvm/lib/Transforms/Utils/CloneFunction.cpp | 21 -------------------- 2 files changed, 35 deletions(-) diff --git a/llvm/include/llvm/Transforms/Utils/Cloning.h b/llvm/include/llvm/Transforms/Utils/Cloning.h index ae00c16e7eada..ec1a1d5faa7e9 100644 --- a/llvm/include/llvm/Transforms/Utils/Cloning.h +++ b/llvm/include/llvm/Transforms/Utils/Cloning.h @@ -230,20 +230,6 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, const char *NameSuffix = "", ClonedCodeInfo *CodeInfo = nullptr); -/// Collect debug information such as types, compile units, and other -/// subprograms that are reachable from \p F and can be considered global for -/// the purposes of cloning (and hence not needing to be cloned). -/// -/// What debug information should be processed depends on \p Changes: when -/// cloning into the same module we process \p F's subprogram and instructions; -/// when into a cloned module, neither of those. -/// -/// Returns DISubprogram of the cloned function when cloning into the same -/// module or nullptr otherwise. -DISubprogram *CollectDebugInfoForCloning(const Function &F, - CloneFunctionChangeType Changes, - DebugInfoFinder &DIFinder); - /// This class captures the data input to the InlineFunction call, and records /// the auxiliary results produced by it. class InlineFunctionInfo { diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 249bef4696b8a..3ccb53236c026 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -168,27 +168,6 @@ void llvm::CloneFunctionAttributesInto(Function *NewFunc, OldAttrs.getRetAttrs(), NewArgAttrs)); } -DISubprogram *llvm::CollectDebugInfoForCloning(const Function &F, - CloneFunctionChangeType Changes, - DebugInfoFinder &DIFinder) { - // CloneModule takes care of cloning debug info for ClonedModule. Cloning into - // DifferentModule is taken care of separately in ClonedFunctionInto as part - // of llvm.dbg.cu update. - if (Changes >= CloneFunctionChangeType::DifferentModule) - return nullptr; - - DISubprogram *SPClonedWithinModule = nullptr; - if (Changes < CloneFunctionChangeType::DifferentModule) { - SPClonedWithinModule = F.getSubprogram(); - } - if (SPClonedWithinModule) - DIFinder.processSubprogram(SPClonedWithinModule); - - collectDebugInfoFromInstructions(F, DIFinder); - - return SPClonedWithinModule; -} - void llvm::CloneFunctionMetadataInto(Function &NewFunc, const Function &OldFunc, ValueToValueMapTy &VMap, RemapFlags RemapFlag, _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits