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

AIR independence day #10924

Merged
merged 3 commits into from
Feb 19, 2022
Merged

AIR independence day #10924

merged 3 commits into from
Feb 19, 2022

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Feb 19, 2022

Prior to this PR, there were two places that AIR referenced ZIR:

  • The arg instruction for the corresponding parameter name
  • The asm instruction for most of the information

After this PR, all the information is duplicated into AIR (or found elsewhere, as in the case of parameter names). AIR is now independent from ZIR. See individual commit messages for more information.

closes #10784

Keep in mind going forward I want to explore #10761 which might further change the code touched in this patchset.

Prior to this commit, the AIR arg instruction kept a reference to a ZIR
string index for the corresponding parameter name. This is used by DWARF
emitting code. However, this is a design flaw because we want AIR
objects to be independent from ZIR.

This commit saves the parameter names into memory managed by
`Module.Fn`. This is sub-optimal because we should be able to get the
parameter names from the ZIR for a function without having them
redundantly stored along with `Fn` memory. However the current way that
ZIR param instructions are encoded does not support this case. They
appear in the same ZIR body as the function instruction, just before it.
Instead, they should be embedded within the function instruction, which
will allow this TODO to be solved. That improvement is too big for this
commit, however.

After this there is one last dependency to untangle, which is for inline
assembly. The issue for that is #10784.
This function is super nice thank you whoever added it 👍
Instead it stores all the information it needs to into AIR.

closes #10784
@andrewrk andrewrk merged commit 2e1c16d into master Feb 19, 2022
@andrewrk andrewrk deleted the air-independence-day branch February 19, 2022 07:57
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.

make AIR instruction for assembly not reference ZIR
1 participant