Skip to content

[NFC][Cloning] Remove now unused CollectDebugInfoForCloning #129152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

artempyanykh
Copy link
Contributor

@artempyanykh artempyanykh commented Feb 27, 2025

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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@llvmbot
Copy link
Member

llvmbot commented Feb 27, 2025

@llvm/pr-subscribers-coroutines

@llvm/pr-subscribers-llvm-transforms

Author: Artem Pianykh (artempyanykh)

Changes

Stacked PRs:

  • #129154
  • #129153
  • ->#129152
  • #129151
  • #129150
  • #129149
  • #129148
  • #129147
  • #129146
  • #129145
  • #129144
  • #129143

[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


Full diff: https://github.com/llvm/llvm-project/pull/129152.diff

2 Files Affected:

  • (modified) llvm/include/llvm/Transforms/Utils/Cloning.h (-14)
  • (modified) llvm/lib/Transforms/Utils/CloneFunction.cpp (-21)
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 11033aeec7dda..f32d9454eb076 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,

jollaitbot pushed a commit to sailfishos-mirror/llvm-project that referenced this pull request Feb 28, 2025
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: llvm/llvm-project#129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
Copy link
Contributor

@felipepiovezan felipepiovezan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/9 to main March 9, 2025 14:30
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 4177775 to f6168cf Compare March 9, 2025 14:30
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/9 March 9, 2025 14:30
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/9 to main March 9, 2025 14:32
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from f6168cf to c670400 Compare March 9, 2025 14:32
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/9 March 9, 2025 14:33
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 0ca9397 to 3b18ff8 Compare March 9, 2025 15:50
artempyanykh added a commit that referenced this pull request Mar 9, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from c670400 to 395b2e4 Compare March 9, 2025 15:50
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 3b18ff8 to 7c2cbfc Compare March 9, 2025 17:50
artempyanykh added a commit that referenced this pull request Mar 9, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 395b2e4 to 86a30c8 Compare March 9, 2025 17:50
artempyanykh added a commit that referenced this pull request Mar 9, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 86a30c8 to 28f40fe Compare March 9, 2025 18:36
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 8b042ee to 1327301 Compare March 12, 2025 11:20
artempyanykh added a commit that referenced this pull request Mar 12, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 28f40fe to fbb3160 Compare March 12, 2025 11:20
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 1327301 to 8e94559 Compare March 12, 2025 23:33
artempyanykh added a commit that referenced this pull request Mar 12, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from fbb3160 to 0bb1f98 Compare March 12, 2025 23:33
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/9 to main March 13, 2025 10:57
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 0bb1f98 to 4a68cde Compare March 13, 2025 10:57
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/9 March 13, 2025 10:57
@llvmbot llvmbot added the coroutines C++20 coroutines label Mar 13, 2025
jollaitbot pushed a commit to sailfishos-mirror/llvm-project that referenced this pull request Mar 13, 2025
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: llvm/llvm-project#129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from a415b77 to ddb729c Compare March 13, 2025 17:18
artempyanykh added a commit that referenced this pull request Mar 13, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 4a68cde to 2688088 Compare March 13, 2025 17:18
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/9 to main March 14, 2025 12:16
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 2688088 to e2aef42 Compare March 14, 2025 12:16
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/9 March 14, 2025 12:16
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 18be509 to 8da28de Compare March 14, 2025 15:08
artempyanykh added a commit that referenced this pull request Mar 14, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from e2aef42 to 6b37028 Compare March 14, 2025 15:09
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/9 branch from 8da28de to a597f7e Compare March 14, 2025 19:34
artempyanykh added a commit that referenced this pull request Mar 14, 2025
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: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 6b37028 to 712ba5d Compare March 14, 2025 19:34
Base automatically changed from users/artempyanykh/fast-coro-upstream-part2-take2/9 to main March 15, 2025 11:44
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 712ba5d to 9d5f7d8 Compare March 15, 2025 11:44
@artempyanykh artempyanykh merged commit fc17114 into main Mar 15, 2025
10 of 11 checks passed
@artempyanykh artempyanykh deleted the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch March 15, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants