Skip to content

[IRGen] Outlined consume functions call noncopyable deinits. #72034

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 18 commits into from
Mar 2, 2024

Conversation

nate-chandler
Copy link
Contributor

If any deinits will be called, pass the full generic environment of the type for which an outlined value function is being emitted. Use the metadata collector to determine whether such deinits exist for single and multi payload enum consumes.

In debug builds, provide some context when an archetype fails to be
found.
In preparation for them handling more polymorphic arguments than merely
metadata.
Gather the circumstances under which the collector should be used and
what it should collect separately and then collect only in one place if
collection should happen.
Not all metadata that the OutliningMetdataCollector collects is for
layout anymore.
If any deinit must be called, just pass the full generic environment of
the type being destroyed.
The include the necessary metadata.
They include the necessary metadata.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review March 2, 2024 05:02
@nate-chandler nate-chandler enabled auto-merge March 2, 2024 05:02
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test macos platform

@nate-chandler nate-chandler merged commit 19fbe5b into swiftlang:main Mar 2, 2024
@nate-chandler nate-chandler deleted the rdar123560548-onone branch March 2, 2024 17:17
@kateinoigakukun
Copy link
Member

It looks like failing on 32bit platforms https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/84/

Command Output (stderr):
--
/home/build-user/swift/test/IRGen/moveonly_value_functions_onone.swift:293:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr noalias nocapture dereferenceable(64) %0, 
               ^
<stdin>:1255:106: note: scanning from here
define swiftcc void @"$s30moveonly_value_functions_onone26takeOuterSinglePayloadNC_2yyAA0fghI2_2OyxGnlF"(ptr noalias nocapture dereferenceable(32) %0, ptr %T) #0 {
                                                                                                         ^
/home/build-user/swift/test/IRGen/moveonly_value_functions_onone.swift:305:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: i64 0, 
               ^
<stdin>:1326:115: note: scanning from here
 %19 = call swiftcc %swift.metadata_response @"$s30moveonly_value_functions_onone26InnerDeinitingReleasableNCVMa"(i32 0, ptr %T) #16
                                                                                                                  ^
/home/build-user/swift/test/IRGen/moveonly_value_functions_onone.swift:388:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: ptr noalias nocapture dereferenceable(64) %0, 
               ^
<stdin>:1663:105: note: scanning from here
define swiftcc void @"$s30moveonly_value_functions_onone25takeOuterMultiPayloadNC_3yyAA0fghI2_3OyxGnlF"(ptr noalias nocapture dereferenceable(32) %0, ptr %T) #0 {
                                                                                                        ^

@nate-chandler
Copy link
Contributor Author

Thanks, @kateinoigakukun . Fixed here: #72051 .

@kateinoigakukun
Copy link
Member

Thanks a lot! @nate-chandler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants