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

[Exclusivity] Add analysis pass summarizing accesses to inout_aliasab… #10191

Merged
merged 1 commit into from Jun 15, 2017

Conversation

Projects
None yet
3 participants
@devincoughlin
Member

devincoughlin commented Jun 11, 2017

…le params

Add an interprocedural SIL analysis pass that summarizes the accesses that
closures make on their @inout_aliasable captures. This will be used to
statically enforce exclusivity for calls to functions that take noescape
closures.

The analysis summarizes the accesses on each parameter independently and
uses the BottomUpIPAnalysis utility class to iterate to a fixed point when
there are cycles in the call graph.

For now, the analysis is not stored-property-sensitive -- that will come in a
latter commit.

@devincoughlin devincoughlin requested a review from atrick Jun 11, 2017

@devincoughlin

This comment has been minimized.

Show comment
Hide comment
@devincoughlin
Member

devincoughlin commented Jun 11, 2017

\cc @rjmccall

@atrick

atrick approved these changes Jun 14, 2017

Beautiful. I don't have any feedback on the design, just nits.

Show outdated Hide outdated lib/SILOptimizer/Analysis/AccessSummaryAnalysis.cpp Outdated
Show outdated Hide outdated lib/SILOptimizer/Analysis/AccessSummaryAnalysis.cpp Outdated
[Exclusivity] Add analysis pass summarizing accesses to inout_aliasab…
…le args

Add an interprocedural SIL analysis pass that summarizes the accesses that
closures make on their @inout_aliasable captures. This will be used to
statically enforce exclusivity for calls to functions that take noescape
closures.

The analysis summarizes the accesses on each argument independently and
uses the BottomUpIPAnalysis utility class to iterate to a fixed point when
there are cycles in the call graph.

For now, the analysis is not stored-property-sensitive -- that will come in a
later commit.
@devincoughlin

This comment has been minimized.

Show comment
Hide comment
@devincoughlin

devincoughlin Jun 15, 2017

Member

Thanks Andy! I updated the patch use the correct terminology for arguments and move instance members to immediately precede constructors. I also removed several unused includes, added a TODO mentioning the need for a SILVerifier, and added a test for missing bodies when processing full applys.

Member

devincoughlin commented Jun 15, 2017

Thanks Andy! I updated the patch use the correct terminology for arguments and move instance members to immediately precede constructors. I also removed several unused includes, added a TODO mentioning the need for a SILVerifier, and added a test for missing bodies when processing full applys.

@devincoughlin

This comment has been minimized.

Show comment
Hide comment
@devincoughlin

devincoughlin Jun 15, 2017

Member

@swift-ci Please smoke test and merge

Member

devincoughlin commented Jun 15, 2017

@swift-ci Please smoke test and merge

@atrick

This comment has been minimized.

Show comment
Hide comment
@atrick

atrick Jun 15, 2017

Member

Awesome! Thanks @devincoughlin.

Member

atrick commented Jun 15, 2017

Awesome! Thanks @devincoughlin.

@devincoughlin

This comment has been minimized.

Show comment
Hide comment
@devincoughlin

devincoughlin Jun 15, 2017

Member

@swift-ci Please smoke test and merge

Member

devincoughlin commented Jun 15, 2017

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 32082f6 into apple:master Jun 15, 2017

2 of 3 checks passed

Test and Merge (smoke test) Build started.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform (smoke test)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment