Skip to content

[ClosureLifetimeFixup] Cleanups get CleanupLocs. #62533

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

nate-chandler
Copy link
Contributor

Otherwise at Onone we can get downstream debug info verification failures.

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test macOS platform

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

huh, I bet this needs to be fixed all over the code. What actually changes with CleanupLocKind? Do certain kinds of instructions require it?

@nate-chandler
Copy link
Contributor Author

nate-chandler commented Dec 13, 2022

@atrick Quite possibly. What changes is that when verifying debug scope holes, this condition is true

// lib/SIL/Verifier/SILVerifier.cpp:5813
if (SI.getLoc().getKind() == SILLocation::CleanupKind)
  continue;

so instructions that are created with autogenerated locs "<compiler-generated>":0:0 aren't required to participate in scope reentry expectations.

Luckily, that verification is only done at Onone, so many places wouldn't need to be updated.

@nate-chandler nate-chandler marked this pull request as ready for review December 13, 2022 15:11
@nate-chandler nate-chandler merged commit 32f9396 into swiftlang:main Dec 13, 2022
@nate-chandler nate-chandler deleted the opaque-values/4/20221209 branch December 13, 2022 15:11
@atrick
Copy link
Contributor

atrick commented Dec 13, 2022

so instructions that are created with autogenerated locs "<compiler-generated>":0:0 aren't required to participate in scope reentry expectations.

oh, I thought it was sufficient just to use an autogenerated location. That's why we're not doing the CleanupLoc think consistently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants