Skip to content

Rewrite ClosureScopeAnalysis for generality. #41826

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
merged 2 commits into from
Mar 18, 2022

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Mar 15, 2022

Handle recursive non-escaping local functions.

Previously, it was thought that recursion would force a closure to be
escaping. This is not necessarilly true.

Update AccessEnforcementSelection to conservatively handle closure cycles.

Fixes rdar://88726092 (Compiler hangs when building)

@atrick atrick requested a review from eeckstein March 15, 2022 20:59
@atrick
Copy link
Contributor Author

atrick commented Mar 15, 2022

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Mar 15, 2022

@swift-ci test source compatibility

@atrick
Copy link
Contributor Author

atrick commented Mar 15, 2022

@swift-ci benchmark

@atrick
Copy link
Contributor Author

atrick commented Mar 16, 2022

@swift-ci test macos

@atrick
Copy link
Contributor Author

atrick commented Mar 16, 2022

@swift-ci test windows

@atrick
Copy link
Contributor Author

atrick commented Mar 16, 2022

All the non-smoke-test targets are failing when updating the git repos

@atrick atrick requested a review from nate-chandler March 16, 2022 17:56
@atrick
Copy link
Contributor Author

atrick commented Mar 16, 2022

I'm planning to merge this later today or tomorrow. As soon as CI is cooperative.

@atrick
Copy link
Contributor Author

atrick commented Mar 16, 2022

@swift-ci test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm!

@atrick
Copy link
Contributor Author

atrick commented Mar 17, 2022

@shahmishal I'd like to get this merged asap, but can't figure out why Mac PR testing fails the same way each time as follows:

error: branch 'ci_pr_41826' not found.
+ true
[Pipeline] sh
+ git -C /Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift branch -D main
error: branch 'main' not found.

@shahmishal
Copy link
Member

@shahmishal I'd like to get this merged asap, but can't figure out why Mac PR testing fails the same way each time as follows:

error: branch 'ci_pr_41826' not found.
+ true
[Pipeline] sh
+ git -C /Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift branch -D main
error: branch 'main' not found.
 ERROR: can't find CMake (please install CMake)

I will look into this right now

@atrick
Copy link
Contributor Author

atrick commented Mar 17, 2022

@swift-ci clean test macOS

@atrick
Copy link
Contributor Author

atrick commented Mar 17, 2022

@shahmishal hope I didn't mess up your investigation by starting a clean build. Here's one of the failure logs: https://ci.swift.org/job/swift-PR-macos-perf/68/console

This radically simplifies the representation of function sets when
analyzing the entire module's call graph at once.
@atrick atrick force-pushed the fix-recursive-closure branch from 119c8f9 to 87d6007 Compare March 18, 2022 01:10
@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci smoke test

@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci clean test macOS

Handle recursive non-escaping local functions.

Previously, it was thought that recursion would force a closure to be
escaping. This is not necessarilly true.

Update AccessEnforcementSelection to conservatively handle closure cycles.

Fixes rdar://88726092 (Compiler hangs when building)
@atrick atrick force-pushed the fix-recursive-closure branch from 87d6007 to ddf0965 Compare March 18, 2022 09:29
@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci smoke test

@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

Possibly a spurious swifpm failure:

swiftpm/Tests/BasicsTests/CancellatorTests.swift:292
:  error: -[BasicsTests.CancellatorTests testFoundationProcessForceKill]
: failed - Found unexpected diagnostics
:  - [warning]: timeout waiting for cancellation with 1 cancellation handlers remainingTest Case '
-[BasicsTests.CancellatorTests testFoundationProcessForceKill]' failed (3.183 seconds).Test Suite 'CancellatorTests' failed at 2022-03-18 10:42:38.770.
- ```

@atrick
Copy link
Contributor Author

atrick commented Mar 18, 2022

@swift-ci smoke test macOS

@atrick atrick merged commit e081091 into swiftlang:main Mar 18, 2022
@atrick atrick deleted the fix-recursive-closure branch March 18, 2022 14:35
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.

3 participants