Skip to content

[Exclusivity] Merge scopes with nested conflicts #19372

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 1 commit into from
Sep 21, 2018

Conversation

shajrawi
Copy link

@shajrawi shajrawi commented Sep 18, 2018

We can merge out-of-scope regardless of having a conflict within a scope
i.e.
begin_access %x

end_access %x

begin_access %x

conflict

end_access %x

can be merged (same for the same scopes in reverse order)
We can always do so unless there's a conflict between the first end_access and the second begin_access

Improves performance by over 26x on array in class benchmark (as one example) - back to (almost) same performance as without exclusivity

radar rdar://problem/44397786

@shajrawi
Copy link
Author

@atrick Can you please review?

@shajrawi
Copy link
Author

@swift-ci Please test

We can merge out-of-scope regardless of having a conflict within a scope
i.e.
  begin_access %x

  end_access %x

  begin_access %x

  conflict

  end_access %x

can be merged (same for the same scopes in reverse order)
We can always do so unless there's a conflict between the first end_access and the second begin_access
@shajrawi
Copy link
Author

Updated the documentation based on @atrick's offline review

@shajrawi
Copy link
Author

@swift-ci Please smoke test and merge

// NOTE: What we really want to do here is to check if
// we should add the new beginAccess to 'mergePairs' structure
// the reason for calling this method is to check for that.
// logically, we only need to add an instructio to
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor typos. Can be fixed now or post-commit.

Otherwise seems ok.

@swift-ci swift-ci merged commit 02b872e into swiftlang:master Sep 21, 2018
@shajrawi shajrawi deleted the arrayinclass branch April 12, 2019 22:42
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