https://github.com/artempyanykh updated https://github.com/llvm/llvm-project/pull/129153
>From bee5d3439332be181a468187202fc0cbb13bc840 Mon Sep 17 00:00:00 2001 From: Artem Pianykh <a...@fb.com> Date: Tue, 25 Feb 2025 13:07:40 -0800 Subject: [PATCH] [NFC][Cloning] Clean up comments in CloneFunctionInto Summary: Some comments no longer make sense nor refer to an existing code path. Test Plan: ninja check-llvm-unit stack-info: PR: https://github.com/llvm/llvm-project/pull/129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11 --- llvm/lib/Transforms/Utils/CloneFunction.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index f32d9454eb076..979cbad0d82c0 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -266,24 +266,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, if (OldFunc->isDeclaration()) return; - // When we remap instructions within the same module, we want to avoid - // duplicating inlined DISubprograms, so record all subprograms we find as we - // duplicate instructions and then freeze them in the MD map. We also record - // information about dbg.value and dbg.declare to avoid duplicating the - // types. DebugInfoFinder DIFinder; - // Track the subprogram attachment that needs to be cloned to fine-tune the - // mapping within the same module. if (Changes < CloneFunctionChangeType::DifferentModule) { - // Need to find subprograms, types, and compile units. - assert((NewFunc->getParent() == nullptr || NewFunc->getParent() == OldFunc->getParent()) && "Expected NewFunc to have the same parent, or no parent"); } else { - // Need to find all the compile units. - assert((NewFunc->getParent() == nullptr || NewFunc->getParent() != OldFunc->getParent()) && "Expected NewFunc to have different parents, or no parent"); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits