Skip to content

[NFC][Cloning] Clean up comments in CloneFunctionInto #129153

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:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@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] 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


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

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/CloneFunction.cpp (-11)
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");

jollaitbot pushed a commit to sailfishos-mirror/llvm-project that referenced this pull request Feb 28, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: llvm/llvm-project#129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
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.

Nice

@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/10 to main March 9, 2025 14:30
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 400a806 to 62454d3 Compare March 9, 2025 14:30
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/10 March 9, 2025 14:30
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/10 to main March 9, 2025 14:32
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 62454d3 to e2e5b39 Compare March 9, 2025 14:32
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/10 March 9, 2025 14:33
@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 added a commit that referenced this pull request Mar 9, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from e2e5b39 to f711cec Compare March 9, 2025 15:50
@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:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from f711cec to fd9ac7b Compare March 9, 2025 17:50
artempyanykh added a commit that referenced this pull request Mar 12, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from bee5d34 to a9b5f38 Compare March 12, 2025 11:20
@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 added a commit that referenced this pull request Mar 12, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from a9b5f38 to 9253bd3 Compare March 12, 2025 23:34
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/10 to main March 13, 2025 10:57
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 9253bd3 to 95de6d8 Compare March 13, 2025 10:57
@llvmbot llvmbot added the coroutines C++20 coroutines label Mar 13, 2025
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/10 March 13, 2025 10:57
jollaitbot pushed a commit to sailfishos-mirror/llvm-project that referenced this pull request Mar 13, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: llvm/llvm-project#129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@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 added a commit that referenced this pull request Mar 13, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 95de6d8 to faa3b3a Compare March 13, 2025 17:18
@artempyanykh artempyanykh changed the base branch from users/artempyanykh/fast-coro-upstream-part2-take2/10 to main March 14, 2025 12:16
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from faa3b3a to 4e49c7f Compare March 14, 2025 12:16
@artempyanykh artempyanykh changed the base branch from main to users/artempyanykh/fast-coro-upstream-part2-take2/10 March 14, 2025 12:16
@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 added a commit that referenced this pull request Mar 14, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 4e49c7f to cd22b53 Compare March 14, 2025 15:09
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/10 branch from 6b37028 to 712ba5d Compare March 14, 2025 19:34
artempyanykh added a commit that referenced this pull request Mar 14, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from cd22b53 to 3779d77 Compare March 14, 2025 19:34
@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 added a commit that referenced this pull request Mar 15, 2025
Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit

stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 3779d77 to 1335a81 Compare March 15, 2025 11:44
Base automatically changed from users/artempyanykh/fast-coro-upstream-part2-take2/10 to main March 15, 2025 16:47
@artempyanykh artempyanykh force-pushed the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch from 1335a81 to 9c588b3 Compare March 15, 2025 16:47
@artempyanykh artempyanykh merged commit fc6fd6a into main Mar 15, 2025
9 of 11 checks passed
@artempyanykh artempyanykh deleted the users/artempyanykh/fast-coro-upstream-part2-take2/11 branch March 15, 2025 19:28
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