Skip to content

[IRGen] Generate compressed representation of value witnesses #63813

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 29 commits into from
Feb 24, 2023

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Feb 21, 2023

rdar://105837040

@drexin
Copy link
Contributor Author

drexin commented Feb 21, 2023

@swift-ci test

@drexin drexin requested a review from aschwaighofer February 21, 2023 22:27
@@ -58,6 +58,7 @@ copied, but do not need to be released or retained.
I16 = 's',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file is outdated and should be removed/replaced with the current design

@drexin drexin requested a review from mikeash February 21, 2023 22:30
@drexin
Copy link
Contributor Author

drexin commented Feb 21, 2023

@mikeash Could you take a look at the Metadata ABI related changes?

@drexin drexin force-pushed the wip-bytecode-witnesses-cleanup branch from 461e909 to 2081478 Compare February 22, 2023 19:44
@drexin
Copy link
Contributor Author

drexin commented Feb 22, 2023

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Feb 22, 2023

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Feb 22, 2023

@swift-ci test

Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runtimey bits look good to me, a few little changes suggested.

@drexin
Copy link
Contributor Author

drexin commented Feb 22, 2023

@swift-ci test macos

1 similar comment
@drexin
Copy link
Contributor Author

drexin commented Feb 22, 2023

@swift-ci test macos

@drexin
Copy link
Contributor Author

drexin commented Feb 23, 2023

@swift-ci test

@@ -4430,6 +4430,12 @@ ExtendedExistentialTypeCacheEntry::getOrCreateVWT(Key key) {
swift_unreachable("shape with unknown special kind had no suggested VWT");
}

const uint8_t *
ExtendedExistentialTypeCacheEntry::getOrCreateTypeLayout(Key key) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is okay because we don't access the type layout string today in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I changed it to nullptr.

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with fixes for the two issues pointed out in various reviews:

  • We should make sure that the metadata's type layout string is address-discriminated signed
  • We need to make sure that we are doing the right thing with multi-payload enums which use spare bits for the tag

@drexin drexin force-pushed the wip-bytecode-witnesses-cleanup branch from 11f5b16 to 171e461 Compare February 23, 2023 21:00
@drexin
Copy link
Contributor Author

drexin commented Feb 23, 2023

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Feb 24, 2023

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Feb 24, 2023

@swift-ci test macos

@drexin
Copy link
Contributor Author

drexin commented Feb 24, 2023

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Feb 24, 2023

@swift-ci smoke test macos

@drexin drexin merged commit a8d4d57 into swiftlang:main Feb 24, 2023
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Feb 26, 2023
swift-ci added a commit that referenced this pull request Feb 26, 2023
…anged_full_typemetadata_layout

Adjust test/IRGen/ptrauth-foreign.sil and test/IRGen/ptrauth-class-methods.sil for changed layout of type metadata after #63813
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.

3 participants