[Exclusivity] Remove dominated access checks with no nested conflict.

General case:

—
begin_access A (may or may not have no_nested_conflict)
load/store
end_access

apply // may have a scoped access that conflicts with A

begin_access A [no_nested_conflict]
load/store
end_access A
—

The second access scope does not need to be emitted.

NOTE: KeyPath access must be identified at the top-level, non-inlinable stdlib entry point.
As such, The sodlib entry pointed is annotated by a new @_semantics that is equivalent to inline(never)
This commit is contained in:
Joe Shajrawi
2018-10-05 09:21:40 -07:00
parent b0389af92e
commit 63b50f65a4
11 changed files with 608 additions and 12 deletions

View File

@@ -530,6 +530,8 @@ IsSerialized_t SILDeclRef::isSerialized() const {
bool SILDeclRef::isNoinline() const {
if (!hasDecl())
return false;
if (getDecl()->getAttrs().hasAttribute<KeyPathEntryPointAttr>())
return true;
if (auto InlineA = getDecl()->getAttrs().getAttribute<InlineAttr>())
if (InlineA->getKind() == InlineKind::Never)
return true;