Skip to content
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

Explicitly lower value pack and parameter expansion types in SIL #63292

Merged
merged 1 commit into from Jan 29, 2023

Conversation

rjmccall
Copy link
Member

Introduce a new SILPackType which captures whether the element types are stored inline in the pack array. Add ParameterConventions and SILArgumentConventions for passing packs. Make a bunch of changes, some of which might be correct.

- SILPackType carries whether the elements are stored directly
  in the pack, which we're not currently using in the lowering,
  but it's probably something we'll want in the final ABI.
  Having this also makes it clear that we're doing the right
  thing with substitution and element lowering.  I also toyed
  with making this a scalar type, which made it necessary in
  various places, although eventually I pulled back to the
  design where we always use packs as addresses.

- Pack boundaries are a core ABI concept, so the lowering has
  to wrap parameter pack expansions up as packs.  There are huge
  unimplemented holes here where the abstraction pattern will
  need to tell us how many elements to gather into the pack,
  but a naive approach is good enough to get things off the
  ground.

- Pack conventions are related to the existing parameter and
  result conventions, but they're different on enough grounds
  that they deserve to be separated.
@rjmccall
Copy link
Member Author

@swift-ci Please test

@rjmccall rjmccall merged commit b4e1e52 into apple:main Jan 29, 2023
@rjmccall rjmccall deleted the lower-pack-types branch January 29, 2023 18:16
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.

None yet

1 participant