-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[NFC][Cloning] Move DebugInfoFinder decl closer to its place of usage #129154
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
[NFC][Cloning] Move DebugInfoFinder decl closer to its place of usage #129154
Conversation
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
7a07326
to
400a806
Compare
e3530ca
to
59c36b2
Compare
@llvm/pr-subscribers-coroutines @llvm/pr-subscribers-llvm-transforms Author: Artem Pianykh (artempyanykh) ChangesStacked PRs:
[NFC][Cloning] Move DebugInfoFinder decl closer to its place of usageSummary: Test Plan: Full diff: https://github.com/llvm/llvm-project/pull/129154.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 979cbad0d82c0..3af07594c848b 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -266,8 +266,6 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
if (OldFunc->isDeclaration())
return;
- DebugInfoFinder DIFinder;
-
if (Changes < CloneFunctionChangeType::DifferentModule) {
assert((NewFunc->getParent() == nullptr ||
NewFunc->getParent() == OldFunc->getParent()) &&
@@ -320,7 +318,8 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
Visited.insert(Operand);
// Collect and clone all the compile units referenced from the instructions in
- // the function (e.g. as a scope).
+ // the function (e.g. as instructions' scope).
+ DebugInfoFinder DIFinder;
collectDebugInfoFromInstructions(*OldFunc, DIFinder);
for (auto *Unit : DIFinder.compile_units()) {
MDNode *MappedUnit =
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
59c36b2
to
252e104
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
252e104
to
279d028
Compare
e2e5b39
to
f711cec
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
279d028
to
dab28ad
Compare
f711cec
to
fd9ac7b
Compare
cc3662c
to
d20de56
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
d20de56
to
0fd78cd
Compare
95de6d8
to
faa3b3a
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
0fd78cd
to
20febd9
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
20febd9
to
dff5d31
Compare
4e49c7f
to
cd22b53
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
dff5d31
to
57c903c
Compare
cd22b53
to
3779d77
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
57c903c
to
cf575ea
Compare
3779d77
to
1335a81
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
cf575ea
to
80ad60f
Compare
1335a81
to
9c588b3
Compare
Summary: This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update. Test Plan: ninja check-llvm-unit stack-info: PR: #129154, branch: users/artempyanykh/fast-coro-upstream-part2-take2/12
80ad60f
to
5075426
Compare
5075426
to
d7dbad2
Compare
Stacked PRs:
[NFC][Cloning] Move DebugInfoFinder decl closer to its place of usage
Summary:
This makes it clear that DIFinder is only really necessary for llvm.dbg.cu update.
Test Plan:
ninja check-llvm-unit