Skip to content

[Serialization] Replace fixed-width fields with smaller VBR fields #26887

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 1 commit into from
Aug 28, 2019

Conversation

jrose-apple
Copy link
Contributor

VBR fields can store up to 64 bits of info in N-bit units, where the top bit describes whether there are further units to come. See http://llvm.org/docs/BitCodeFormat.html for more information. In the cases of the fields changed here, these are all usually-small values that can occasionally get a lot larger; a VBR field allows us to pick a reasonable default while still not setting a maximum.

Swiftmodule size micro-optimization. No functionality change; due to LLVM bitstream being a self-describing container format, this does not actually break compatibility.

VBR fields can store up to 64 bits of info in N-bit units, where the
top bit describes whether there are further units to come. See
http://llvm.org/docs/BitCodeFormat.html for more information. In the
cases of the fields changed here, these are all usually-small values
that can /occasionally/ get a lot larger; a VBR field allows us to
pick a reasonable default while still not setting a maximum.

Swiftmodule size micro-optimization. No functionality change; due to
LLVM bitstream being a self-describing container format, this does not
actually break compatibility.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

I agree, all of these make sense to optimize for small cases.

@jrose-apple jrose-apple merged commit e9d22f2 into swiftlang:master Aug 28, 2019
@jrose-apple jrose-apple deleted the postfixed branch August 28, 2019 00:44
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