Skip to content

[pull] swiftwasm from main #5499

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

Merged
merged 55 commits into from
Jun 7, 2023
Merged

[pull] swiftwasm from main #5499

merged 55 commits into from
Jun 7, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 7, 2023

See Commits and Changes for more details.


Created by pull[bot]

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

bnbarham and others added 30 commits June 2, 2023 10:11
Adds wrapping structs for a bunch of commonly bridged types (but not all
the AST nodes yet).
The Swift backtracer's frame pointer unwinder cannot work on Linux
without this change, because the compiler omits the frame pointer from
the function in libSwift_Backtracing that actually captures the stack.

rdar://110260855
For Apple platforms, enable the new stricter boxing semantics only
for apps built against the Fall 2023 or later SDK.  This
avoids breaking apps that relied on the old behavior and
have not been updated since then.
When `-unavailable-decl-optimization=complete` is specified obsolete decls
should be preserved because their symbols are still ABI since they are
available to use when targeting deployment targets earlier than the obsoletion
version.

Resolves rdar://110268649
…at-for-boxing-semantics

[Dynamic Casting] Use old boxing semantics for pre-Fall-2023 apps
…ion should not copy the collection

This makes the `CxxConvertibleToCollection` parameter shared, preventing the unnecessary copy of the C++ value.

rdar://110110376
…lete-decls

SIL: Don't skip lowering obsolete decls
drop_deinit ultimately only affects the semantics of its
destroy_value. Avoid generating releases for destroys in which the
deinit has been dropped. Instead, individually release the members.
drop_deinit only exists in ownership SIL. Remove IRGen support.

A drop_deinit can only ever be destroyed or destructured.

A destructure of a struct-with-deinit requires a drop_deinit operand.
to MoveOnlyDeinitDevirtualization
It is not needed for correctness and hides most of the deinit related
optimizer bugs.
Many basic SIL passes were silently deleting the struct deinit:
- SROA
- Mem2Reg
- RLE
- DSE
- FunctionSignatureOpts
- LowerAggregates

Fixes rdar://109849028 ([move-only] LowerAggregateInstrs eliminates struct deinitialization)
Multiple code motion and ARC related passes were removing struct/enum
deinits.

Passes fixed include:
- SILCombine
- EarlyCodeMotion
- ReleaseHoisting
- *many* passes that rely on ARC analysis (RCIndentity)
Fix a special case in visitReleaseValueInst for enum-with-deinit.
MoveOnlyLoadableStruct should only lower to memberwise destroys if it
has no deinit.
The -Onone passes fail to remove struct_extract, so the CHECK
lines will fail.
…() instead of getASTType() to prevent us from looking through no implicit copy types while serializing.

This change makes sense since, in general, when serializing we do not want to
look through no implicit copy types since we are trying to 1-1 preserve the
SIL.
…h the AST serialization machinery.

This looks like a thinko from the early part of the implementation. Without
this, the machinery doesn't recognize the layout and just asserts.
…uming/Borrowing.

I also added a static_assert to make sure that we always catch this in the
future.
…e_addr.

The reason why I am using a different instruction for addresses and objects here
is that the object checker doesnt have to deal with things like initialization.
…lywrapper_addr.

Just the $*T -> $*@moveOnly T variant for addresses. Unlike the object version
this acts like a cast rather than something that provides semantics from the
frontend to the optimizer.
gottesmm and others added 25 commits June 6, 2023 12:42
[Backtracing][IRGen] Add a semantic attribute to force frame pointer.
…nvertible

[cxx-interop] Initializing a Swift.Array from CxxConvertibleToCollection should not copy the collection
[Serialization] Fix serializing CompilerPluginExecutablePaths values
[NFC][ASTGen] Add wrapping structs for commonly bridged types
I am going to use this to unwrap ${ @moveOnly T } so that I can pass it to
partial_apply that expect a ${ T }
[move-only] Fix SIL representation and SILOptimizer to preserve value deinits
…on (swiftlang#66379)

We introduced shared abstractions for handling the different tags for the other runtime functions, so we should use them here as well.
[cxx-interop] add a SWIFT_MUTATING customization macro
Preliminary support for substitution with nested pack expansions
…w-consuming

[borrowing/consuming] Make borrowing and consuming parameters no implicit copy.
@kateinoigakukun kateinoigakukun merged commit de36d43 into swiftwasm Jun 7, 2023
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.