Skip to content

[CIR] Replace RecordType data layout calculations #1569

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
Apr 18, 2025

Conversation

andykaylor
Copy link
Collaborator

We have been using RecordLayoutAttr to "cache" data layout information calculated for records. Unfortunately, it wasn't actually caching the information, and because each call was calculating more information than it needed, it was doing extra work.

This replaces the previous implementation with a set of functions that compute only the information needed. Ideally, we would like to have a mechanism to properly cache this information, but until such a mechanism is implemented, these new functions should be a small step forward.

We have been using RecordLayoutAttr to "cache" data layout information
calculated for records. Unfortunately, it wasn't actually caching the
information, and because each call was calculating more information than
it needed, it was doing extra work.

This replaces the previous implementation with a set of functions that
compute only the information needed. Ideally, we would like to have a
mechanism to properly cache this information, but until such a mechanism
is implemented, these new functions should be a small step forward.
@xlauko
Copy link
Collaborator

xlauko commented Apr 18, 2025

LGTM

@bcardosolopes
Copy link
Member

Thanks guys!

@bcardosolopes bcardosolopes merged commit 390cf25 into llvm:main Apr 18, 2025
10 checks passed
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