Skip to content

Simplify AccessEnforcementOpts by leaving access markers in place. #16835

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
May 29, 2018
Merged

Simplify AccessEnforcementOpts by leaving access markers in place. #16835

merged 2 commits into from
May 29, 2018

Conversation

atrick
Copy link
Contributor

@atrick atrick commented May 25, 2018

This just simplifies the code a bit and does less work. The effect should be the same since this is meant to be run very late in the pipeline and we want to teach all SIL passes to gracefully handle access markers.

atrick added 2 commits May 24, 2018 22:18
The extra cost of deterministically deleting instructions is unnecessary. In the
long term, we'll want to verify that access markers exist after all SIL
passes. So just change their enforcement level rather than removing them.
@atrick
Copy link
Contributor Author

atrick commented May 25, 2018

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented May 25, 2018

@shajrawi, could you review the reworded comments?

@atrick atrick merged commit dca28f0 into swiftlang:master May 29, 2018
/// access. (Some Unidentified accesses are for initialization or for
/// temporary storage instead, but those should never have Dynamic
/// enforcement). These accesses can only be eliminated when there is no
/// Unidentified access within the function without the [no_nested_conflict]

Choose a reason for hiding this comment

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

The wording in the last sentence here is a little bit confusing. had to re-read it a couple of times to understand. could be easier to understand if an example is show. or if it is expanded to explain how the presence of a [no_nested_conflict] - less access prevents us from eliminating accesses.
Otherwise LGTM!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, thanks. I changed it to simply read:
/// - Stack or Box local storage could potentially be accessed via Unidentified
/// access. (Some Unidentified accesses are for initialization or for
/// temporary storage instead, but those should always have Unsafe
/// enforcement). If this function contains an Unidentified access without its
/// [no_nested_conflict] flag set, then any of the function's local storage
/// could have a nested conflict.

There are comments elsewhere in the code related to it.

@atrick atrick deleted the accessfold branch June 20, 2018 00:11
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