Skip to content

Compute padding outside of codegen #959

Open
@fitzgen

Description

Right now, we compute a struct's padding fields while we are codegen'ing it.

Instead, we should have a dedicated phase for computing implicit padding fields that transforms from structs-with-only-explicit-fields to structs-with-explicit-fields-and-implicit-padding-fields.

Benefits this will give us:

This new phase should probably happen either right before or right after we compute allocation units for bitfields. I'm not 100% sure which, and determining it requires further investigation/experimentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions