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

Simplification of the code (bail on unpaired accesses) + change the implementation so we can avoid quadratic behavior
This commit is contained in:
Joe Shajrawi
2018-10-25 17:23:05 -07:00
parent 63b50f65a4
commit b5508f5488
8 changed files with 184 additions and 124 deletions

View File

@@ -530,12 +530,13 @@ 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;
return false;
if (auto *semanticsA = getDecl()->getAttrs().getAttribute<SemanticsAttr>())
if (semanticsA->Value.equals("keypath.entry"))
return true;
return false;
}
/// \brief True if the function has noinline attribute.