Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Aug 11, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

kateinoigakukun and others added 30 commits April 14, 2022 15:53
LTO pipeline requires consistent `EnableSplitLTOUnit` and module summary
in regular full LTO bitcode, and clang enables `EnableSplitLTOUnit` and
emit regular lto module summary on non-ld64 platforms.
Therefore, swiftc has to emit them for the consistency with clang.
…e-indents

[ConstraintSystem] NFC: Refactor solver state depth to its own function fo…
…nt-enum

[Interop][SwiftToCxx] add support for resilient enum
…init]/load [copy] on move only values in Raw SIL.

This is already an invariant for copy_value and now that I am implementing move
semantics for addresses, it makes sense to ban those in a similar
way. Specifically, we are enforcing the invariant that move only types are
allowed to be copied in Raw SIL, but not in later parts of SIL. For those who
are unaware, we then run checkers later to validate that we preserve ownership
semantics.
…w SIL, but not in later SIL stages.

Since I am going to start enforcing this invariant more broadly, I want to
document it in SIL.rst. I also included a discussion explaining why we maintain
this invariant: it enables SILGen to use a simple algorithm to insert copies/us
to clean that up using a diagnostic guaranteed optimization pass which runs on
Raw SIL.
…ve copy_value a move only value as an operand.

I am enforcing this in the verifier, so it makes sense to document in SIL.rst.
There really isn't a point in repeating the verbage from copy_value. So I
removed that and just referred back to the copy_value documentation and focused
instead on what makes explicit_copy_value different semantically from
copy_value, how it is used to work around the invariant in Canonical SIL that
move only typed values can not be copied. This is useful for:

1. Implementing an explicit copy for no implicit copy types.

2. When the move checker errors since it can't produce a move only solution for
a value, we change all of the copies into explicit_copy_value. We need some sort
of copy to ensure later once we are in Canonical SIL, Ownership SSA is correct
/and/ we maintain the no copy of move only typed values in Canonical SIL.
…metic-seal-with-lld

[IRGen] Emit mod summary for full LTO to enable hermetic seal with lld
…ymbols from a module.

The effect of declaring an import `@_weakLinked` is to treat every declaration from the module as if it were declared with `@_weakLinked`. This is useful in environments where entire modules may not be present at runtime. Although it is already possible to instruct the linker to weakly link an entire dylib, a Swift attribute provides a way to declare intent in source code and also opens the door to diagnostics and other compiler behaviors that depend on knowing that all the module's symbols will be weakly linked.

rdar://96098097
Strange as it sounds, we parse

@foo public

in item position as a decl that has a hanging attribute and access
control modifier. We need to be able to stick... something in the
tree here so we don't just drop these tokens on the floor.
…ype and superclass requirements

A requirement of the form T == G<T> is never valid, and T == G<T.A>
will leave behind a term T.[P:A] once the conformance T : P is
dropped in contraction. So just ignore recursive requirements
here, allowing them to be properly diagnosed later.
Note the test cases in abstract_type_witnesses used to pass but are now
rejected. This is fine, because doing anything more complicated used to
crash, and the GSB would crash or misbehave with these examples.
tshortli and others added 4 commits August 11, 2022 11:22
This is exactly like copy_addr except that it is not viewed from the verifiers
perspective as an "invalid" copy of a move only value. It is intended to be used
in two contexts:

1. When the move checker emits a diagnostic since it could not eliminate a copy,
we still need to produce valid SIL without copy_addr on move only types since we
will hit canonical SIL eventually even if we don't actually codegen the SIL. The
pass can just convert said copy_addr to explicit_copy_addr and everyone is
happy.

2. To implement the explicit copy function for address only types.
RequirementMachine: Fix crash-on-invalid with recursive same-type requirements
AST/IRGen: Accept `@_weakLinked` on import decls to force weak linkage of symbols from a module
gottesmm and others added 4 commits August 11, 2022 16:25
…f817b15b928dbe11485c361

[move-only-addresses] Slicing some patches off of the larger patch.
…ite-to-gh-issues-1

Gardening: Migrate test suite to GH issues p. 1
…ing-space

[gyb_syntax_support] No longer require trailing space after expression-like keywords
MissingDeclSyntax Can Have Attributes and Modifiers
@kateinoigakukun kateinoigakukun merged commit 9f6a375 into swiftwasm Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.