-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add access marker removal to AccessEnforcementOpts. #16771
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
Conversation
FYI @shajrawi. |
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.
Current changes LGTM! Need to add test-cases of course.
Previously, it only folded begin/end access into a single runtime operation. When all accessed for a uniquely identified storage object have been folded, then they can all be removed. Reworked the design of the pass so this falls out naturally just by updating AccessedStorageAnalysis.
…LVerifier. This is necessary for the correctness of optimizations that remove markers. We must know that an unidentified access can never see class or global properties.
This makes the intention more clear and sets up a new optimization to merge access scopes.
@swift-ci test. |
@swift-ci benchmark. |
@swift-ci test. |
@swift-ci benchmark. |
Build comment file:Optimized (O)Regression (1)
No Changes (435)
Unoptimized (Onone)Regression (5)
Improvement (2)
No Changes (429)
Hardware Overview
|
The benchmark results above aren't meaningful. With exclusivity enabled, this optimization improves the "MultiFile" benchmarks by 10%. This pass only removes local access markers when either: |
Looks like this broke the debug stdlib: https://ci.swift.org/view/Dashboard/job/oss-swift_tools-RA_stdlib-DA_test-simulator/295/. Are you going to have time to look at this or should I revert? |
I'll look at it now, but I will revert the aggressive verification in the meantime. |
Attempting to revert the verifier change here: #16823 |
Still looking at test cases and benchmarks.