Swift SIL: escape effects for function arguments.

Store a list of argument effects in a function, which specify if and how arguments escape.
Such effects can be specified in the Swift source code (for details see docs/ReferenceGuides/UnderscoredAttributes.md) or derived in an optimization pass.

For details see the documentation in SwiftCompilerSources/Sources/SIL/Effects.swift.
This commit is contained in:
Erik Eckstein
2021-09-24 10:22:31 +02:00
parent 72fc4e3c95
commit f09dfc93a9
21 changed files with 836 additions and 35 deletions

View File

@@ -66,6 +66,10 @@ ATTRIBUTE_NODES = [
kind='DerivativeRegistrationAttributeArguments'),
Child('NamedAttributeString',
kind='NamedAttributeStringArgument'),
# TokenList for custom effects which are parsed by
# `FunctionEffects.parse()` in swift.
Child('TokenList', kind='TokenList',
collection_element_name='Token'),
], description='''
The arguments of the attribute. In case the attribute
takes multiple arguments, they are gather in the